cURL causing web server to stall

Hey guys,

Some sites I view using cURL to download the content are causing my web server to stall indefinitely (restarting server fixes it). I am not sure what causes this, but it’s the same sites that do it. Is there a way to make the server stop trying to load a page after a given amount of time, so stalling does not occur?

Thanks much

  1. have you checked to see what errors are being returned from cURL, either in the cURL function or in the server logs?

  2. Maybe try a timeout for cURL connections: http://stackoverflow.com/questions/1418583/curl-connect-timeout-not-working