Hi, is there a way to avoid my cron stops running with the "Maximum execution time exceeded" error when some of my URL's feeds are not online? It seems that the modulo hangs asking for the URL. Is there a timeout value I can set somewhere to the fetcher?
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 671538-10_follow_up.patch | 1.72 KB | alex_b |
| #8 | feeds_curl_timeout_url.patch | 1.61 KB | awlo |
| #7 | 671538-7_curl_timeouts.patch | 1.89 KB | alex_b |
| #6 | feeds_curl_timeout.patch | 915 bytes | awlo |
Comments
Comment #1
alex_b commentedI have never researched Feeds' behavior when feeds are not available.
Could you measure how long Feeds (more specifically the downloader in libraries/http_request.inc) waits for an offline feed? Did you look at curl settings? Are there other heavy cron tasks? Have you tried using Drupal Queue together with Feeds?
Comment #2
alex_b commentedClosing after more than 4 weeks of inactivity.
Comment #3
awlo commentedCurrently, there's no timeout setting (CURLOPT_TIMEOUT) for curl connection when using http_request. Would you accept a patch adding that?
Comment #4
awlo commentedComment #5
alex_b commentedYes, what time should we set it to?
Comment #6
awlo commentedAdded CURL_TIMEOUT setting to the curl connection in libraries/http_request.inc . The setting is equal to 'feeds_worker_time' variable.
Added error reporting (via exceptions).
Comment #7
alex_b commented- Use t()
- Introduce HRCurlException - this allows us to just escalate the curl error code with the exception (see how we're passing the error code into the exceptions constructor now).
If you could test this and give me an RTBC I can commit it.
Comment #8
awlo commentedTested, working fine.
In this patch I only added the url parameter to the error string, so that it's clear for which url the curl failed.
Comment #9
alex_b commentedThis is committed, thank you.
http://drupal.org/cvs?commit=417874
Comment #10
alex_b commentedOne small change: In the spirit of keeping http_request.inc an independent library, we can't use Feeds variables in it. I'll change the use of feeds_worker_time to http_request_timeout therefore.
See patch attached.
Comment #11
alex_b commented#10 is committed.