I’ve got a site with a lot of feeds (25+) and feed items (200+) set to expire hourly and reimport.
Issue I’m stuck on is incomplete execution of these processes on cron jobs. I’ve tweaked a number of cron settings to try and exhaust the possibility this problem is related to php execution limits on cron jobs. Cron-specific changes include:
php_value max_execution_time 360
added to .htaccess, andmax_execution_time 360
added to settings.php, expecting to bypass Rackspace Cloud Sites 30 second timeout- Rackspace cron setup through cron_curl.sh as perl script in their hosting admin section. (For anyone following along other articles, Configuring Cron on Rackspace Cloud Sites suggests http pointing to site’s cron.php file will work, but this http request will timeout at 30 seconds
I consistently get Cron run completed messages in /admin/reports/dblog (regardless if fired locally, or by server). Job_scheduler (used by Feeds) also claims to complete in its log entry, (ex: “Finished processing scheduled jobs (2 sec s, 99 total, 0 failed”), and likewise, Feeds Log (/admin/reports/feeds) shows successful imports, updates, and created logs for some Feeds and their Feed Item nodes.
But these imports are breaking my site because they never finish. I need all Feed and Feed Items to import at once. Seem still to be timing out at 30 seconds, evidenced by adding up “Imported in x seconds” of each cron job, always about 30 seconds.
What am i missing? Anything inside of Feeds setting this timeout? Any other ideas?!
Comment | File | Size | Author |
---|---|---|---|
#13 | feeds-add_http_request_timeout_ui_setting-1480902-13.patch | 6.13 KB | PatchRanger |
#13 | interdiff2.txt | 2.74 KB | PatchRanger |
#10 | interdiff.txt | 3.94 KB | PatchRanger |
#9 | add_http_request_timeout_ui_setting-1480902-9.patch | 6.56 KB | PatchRanger |
#7 | add_http_request_timeout_ui_setting-1480902-7.patch | 8.32 KB | PatchRanger |
Comments
Comment #1
surf12 CreditAttribution: surf12 commentedi have the same problem
Comment #2
sydneyshan CreditAttribution: sydneyshan commentedI've got the same issue with Feeds 6.x-1.0-beta11 and Job Scheduler 6.x-1.0-beta3 - did you figure out how to resolve this? I've got 1000 items to import/update via feeds using cron. Job Scheduler says it's finished after processing about 60 of them...!
If I run the feed import via the website frontend all items import successfully.
I've tried extending the timeout of wget and my php environment (max execution time) but it's not an execution timeout issue...
/usr/bin/wget --timeout=5000 -O - -q -t 1 http://www.example.com/cron.php
It seems Job Scheduler is giving up early for some unknown reason...
Comment #3
franzI never had such a timeout issue. No, feeds doesn't have a timeout, I'm guessing this is an external issue, either with another module or with some PHP/Apache. Maybe you should check if the php setting is being respected (using phpinfo()?). You can also try running cron from drush.
Comment #4
balazs.hegedus CreditAttribution: balazs.hegedus commented@faunt:
I've had a similar problem and managed to sort it out by setting http_request_timeout to a higher value as suggested here. Please note, this only works if you have curl installed. Also see my notes and a possible solution for the curl limitation at the issue I've just created.
Comment #5
PatchRanger CreditAttribution: PatchRanger commented@faunt They are. As you could see in README.TXT there is a hidden setting that you can define by adding it to the $conf array in your settings.php file:
I confirm that it is not comfortable way.
I have 2 different values of this setting on localhost and on production and it makes my settings.php permanently overridden.
Let's do it this way. Here you are a patch that adds this setting to UI.
How to
As usual before any changing.
Note: For this purpose you can use Drush (recommended). Or if you can't - use Patch Manager. (But note that this module needs patched files to be writable for server that is insecure. Though you could change permissions, apply patch - and then change permission back to secure permission configuration.)
It will set http_request_timeout setting to default value (30).
After all this actions done you will see a textfield on admin/structure/feeds page.
Also please note that as soon as this patch get committed this setting will be available by default for every fresh install of feeds_ui module.
It automatically fixes some other issues related to http_request_timeout setting such as:
Comment #6
twistor CreditAttribution: twistor commentedIf we are going to add a UI option for timeouts it should be a per-importer setting that overrides http_request_timeout.
Comment #7
PatchRanger CreditAttribution: PatchRanger commentedPer-importer setting that overrides http_request_timeout is implemented.
Please review.
Comment #8
twistor CreditAttribution: twistor commentedThe setting on the overview page should be removed. Having multiple places for the same thing confuses people. Timeout should be the last setting, not the first.
Comment #9
PatchRanger CreditAttribution: PatchRanger commentedDone.
Please review once more.
Comment #10
PatchRanger CreditAttribution: PatchRanger commentedHere is interdiff of these 2 patches.
Comment #11
twistor CreditAttribution: twistor commentedThis is not needed. That's what the variable default is for.
This should have been there all along :) But it should be in feeds.install.
This is not needed.
"When left empty, the global value is used."
Comment #12
twistor CreditAttribution: twistor commentedAlso, let's use a setter/getter rather than adding $timeout to the constructor. I believe that will throw a strict error.
Comment #13
PatchRanger CreditAttribution: PatchRanger commentedDone. Please review.
Interdiff is also attached to save your time.
Comment #14
franzLooks good to me, fixed issues on #11.
Comment #15
twistor CreditAttribution: twistor commentedAwesome!
Thanks for sticking this out.
7.x
http://drupalcode.org/project/feeds.git/commit/253fbea
Comment #16
charlie-s CreditAttribution: charlie-s commentedYou may also need to increase the default_socket_timeout. You can do both in settings.php:
Comment #17
lwalley CreditAttribution: lwalley commentedI'm still experiencing timeouts with some custom target alters because FeedsEnclosure::getContent() calls http_request_get but does not specify a timeout value so it defaults to http_request_timeout variable or to 30 seconds. I could increase http_request_timeout variable value, but I think it would be good if the individual importer's fetcher timeout setting could also be used.
I've outlined the issue in more detail in #2076065: Timeout when using FeedsEnclosure::getContent in target alter. I just wanted to add a link here in case anyone was experiencing the same issue or perhaps has some ideas on how best to resolve.
Comment #18
kenorb CreditAttribution: kenorb commentedhttps://www.drupal.org/drupal-6-eol
Comment #19
kenorb CreditAttribution: kenorb commented