[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: PHP's CURL & Tor integration hangin



On 7/21/07, Mr. Blue <trashdsfg@xxxxxxxxx> wrote:
...
Be aware that I did set connection timeout for CURL at
60 seconds ...

is this connect timeout, dns resolve timeout, transfer timeout, etc?


If site does load, then exit node is considered valid
and then I use it to POST data at 12 sites.

you're not doing anything obnoxious, are you? :)


Problem is that every approx. 15th - 30th time, it
hangs indefinitely at, for example, 7th site.
Even when node was checked at a begening before usage,
against 60sec connection timeout rule it can stuck at
any of sites.

Last time it did hang that way for 19 hours?!?

that sounds like a curl/php problem.


Obviously, it is up to Tor, because it is sending some
signal to reset 60sec CURL's rule for termination(so
PHP's CURL can't close it!!).

it is up to Tor?  Tor will timeout a failed connect attempt at 120 or
180 seconds(?), but if you've got a connection, and the server doesn't
close it, and you never time it out, sure, it could hang open for
hours.

you need to fix the curl part to timeout transfers as well as connect/dns.

best regards,