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?

Comments

alex_b’s picture

Status: Active » Postponed (maintainer needs more info)

I 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?

alex_b’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Closing after more than 4 weeks of inactivity.

awlo’s picture

Currently, there's no timeout setting (CURLOPT_TIMEOUT) for curl connection when using http_request. Would you accept a patch adding that?

awlo’s picture

Category: support » feature
Status: Closed (fixed) » Active
alex_b’s picture

Title: Error when RSS URL is unavailable » Use CURLOPT_TIMEOUT

Yes, what time should we set it to?

awlo’s picture

Status: Active » Needs review
StatusFileSize
new915 bytes

Added 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).

alex_b’s picture

StatusFileSize
new1.89 KB

- 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.

awlo’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new1.61 KB

Tested, 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.

alex_b’s picture

Status: Reviewed & tested by the community » Fixed

This is committed, thank you.

http://drupal.org/cvs?commit=417874

alex_b’s picture

StatusFileSize
new1.72 KB

One 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.

alex_b’s picture

#10 is committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.