Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Verifying Links

Quote Reply
Verifying Links
Have one problem with verifying links (nph-verify.cgi).

Script got broken when got on one link (don't know which exactly) for which waits respond over 100 sec.

My admin told me that script is using pconnect for connecting on database and 100 sec is time that mysql will wait for pconnect to respond.

Is it possible to set timeout in script so it won't wait for answer more then 100 sec. Let says if there is no respond from URL in 30 sec it should timeout and went on another URL.

UnReal Network
Quote Reply
Re: [deadroot] Verifying Links In reply to
Any?

UnReal Network
Quote Reply
Re: [DeadMan] Verifying Links In reply to
Hi,

I think I'm having the same problem :(

One of the links seems to be hanging the process, and then just freezes :/ (i.e doesn't carry on)

Any ideas GT?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Verifying Links In reply to
*bump* ... GT?

I could just write my own verification script - but ideally would prefer if this problem could be resolved - as it seems I'm not the only person with issues :(

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [DeadMan] Verifying Links In reply to
Try this patch to Links/Tools.pm:
Code:
--- Links/Tools.pm.org 2008-03-11 23:04:21.000000000 -0700
+++ Links/Tools.pm 2008-03-11 23:03:18.000000000 -0700
@@ -367,8 +367,24 @@
require GT::WWW;

my $www = new GT::WWW;
- eval { $www->url($url) } or return -5;
- my $response = $www->head;
+ eval {
+ $www->url($url);
+ } or return -5;
+
+ my $response;
+ eval {
+ local $SIG{ALRM} = sub { die "time out\n" };
+ alarm(30);
+# We're handling connection timeouts ourselves (GT::Socket sets an alarm, so we
+# don't want it to set another alarm).
+ $www->connection_timeout(0);
+ $response = $www->head;
+ alarm(0);
+ };
+
+ if ($@ and $@ eq "time out\n") {
+ return -4;
+ }

# Could not connect for some reason or the server returned an invalid response
return -4 unless $response;

It waits at most 30 seconds for to fetch the headers from the server. Let me know if it works for you, and if so, I'll commit it (or something similar).

Adrian

Last edited by:

brewt: Mar 11, 2008, 11:09 PM
Quote Reply
Re: [brewt] Verifying Links In reply to
Hi,

Thanks - trying it out now :) Will post when I've given it a go Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Verifying Links In reply to
Hi,

Well, tested about 20-30k links now, and it's still going - so looks like you've nailed it - thanks Cool (it wasn't even managing 10k before)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Verifying Links In reply to
Cool. I'll tested also.

Btw, maybe to put something like this in your check.cgi for RecipLink plugin?

Regards.

UnReal Network
Quote Reply
Re: [Andy] Verifying Links In reply to
For the first time, verifying links got completed! Yeah!

Btw, Andy, this "mySQL gone away" error I also got from check.cgi from Recip_Link plugin. Maybe to implement something like this in your script?

Regards.

UnReal Network
Quote Reply
Re: [brewt] Verifying Links In reply to
Why am I sometimes got error "Could Not Connect (-4)" or "Gateway error timeout (503) or "Internal error (500)" although URL are just fine and it's working (when I manual put URL in address bar of browser)?

UnReal Network
Quote Reply
Re: [DeadMan] Verifying Links In reply to
The server might be doing something different for verify's request.

Adrian
Quote Reply
Re: [brewt] Verifying Links In reply to
Hi,

I have the same problem.

But, I do not know how to use this code in the Tools.pm file.

Can somebody indicate how to use it ?

Thank you for your assistance.

Mick
Quote Reply
Re: [Andy] Verifying Links In reply to
Hi Andy,

I have the same problem and I would like to use the code suggested by Adian. But it causes an error.

I think that I correctly do not use the code in the Links/Tools.pm file.

These lines should simply be added ?

Thank you for your assistance.

Mick
Quote Reply
Re: [Oyo] Verifying Links In reply to
Hi,

I'll PM you the fixed version in a few mins :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Verifying Links In reply to
Thanks Andy, it is perfect !

Mick
Quote Reply
Re: [Andy] Verifying Links In reply to
Hi Andy, Please Could you help me too?

Many thanks

cheers
Samuel
Quote Reply
Re: [thepixel] Verifying Links In reply to
I'll post this to the update system in a bit.

Edit: This is available in the update system now.

Adrian

Last edited by:

brewt: Jul 28, 2008, 6:40 PM
Quote Reply
Re: [brewt] Verifying Links In reply to
thanks a lot :D