Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I installed latest drupal and beta 9 of feeds. When i hit import on feed node it imports new nodes, but when cron is run nothing happens and there are no new nodes? Any idea on this? Its vanilla setup from yesterday, run on localhost.
Comment | File | Size | Author |
---|---|---|---|
#56 | feeds-927782-56.patch | 1.18 KB | Dane Powell |
#35 | FeedsImporter.inc_.patch | 839 bytes | kenorb |
#34 | FeedsImporter.inc_.patch | 514 bytes | kenorb |
Comments
Comment #1
psampaz CreditAttribution: psampaz commentedI have the same problem. For some feeds (not all) i have to manually import new items. Cron does not import them. Any ideas?
Comment #2
laghalt CreditAttribution: laghalt commentedThis is a major bug and has been a couple of versions of betas.
You find it in: http://drupal.org/node/705444
(issue closed for some reason)
Have tried to fix it myself but im new to this module and not a master on cron.
Comment #3
alex_b CreditAttribution: alex_b commentedCan you link to the feed you are importing and explain your importer configuration?
Comment #4
Marko B CreditAttribution: Marko B commentedI manged to make it work, dont know how exactly. I did some reinstalling of job schedular, reinstalled feeds, think many problems can come from not deleting old feeds directory.
Comment #5
MichelleThat other issue was marked a duplicate of #916962: Fix undefined feeds_reschedule() when upgrading (feeds not updating on cron) but that's evidentially not the whole problem because I just checked out the latest from CVS and it's still not importing on cron.
This was working fine for me in beta 5. I did a jump up to beta 9 shortly after it came out and it's been broken ever since. I always delete the old directory before untarring (or checking out) the new one so that's not it for me.
re #3: I'm importing about 20 different feeds from different places. It's not the feeds with the problem because they import manually just fine. It's only on cron that it's not working. They're all set up so there's a feed node. HTTP Fetcher / Common syndication parser / Node processor.
I'm trying to poke around in the code but not finding anything so far. Any tips on where, exactly, to look would be great. :)
Thanks,
Michelle
Comment #6
XiaN Vizjereij CreditAttribution: XiaN Vizjereij commentedDid you adjust the "hidden" job scheduler settings in the the settings.php? ( look in the readme of both modules ) They changed when feeds outsourced the job_scheduler.
Comment #7
MichelleNo, but I don't see anything in either readme that says I have to set something to make cron work. Could you be more specific?
Thanks,
Michelle
Comment #8
alex_b CreditAttribution: alex_b commented#6/#7 No hidden settings need to be adjusted for having cron aggregating feeds. If you have changed a hidden setting to 'fix' something, you're at best working around another issue.
I am really interested in fixing you guys' issues with Feeds on cron. My simple problem is that I can't reproduce these reported issues. I run literally dozens of instances of feeds and there is no issue with any feeds not being updated.
Grab me on IRC.
Comment #9
XiaN Vizjereij CreditAttribution: XiaN Vizjereij commentedMichelle, try setting this to an very high number ( like 5000 ) and see if it works then
from job_scheduler readme.
But they need to be adjusted to make feeds work as expected. And i'm pretty sure that most of those errors are simply "not working as intended" errors. E.G. feeds is working fine, but only updating 5 feeds with no new content, which results in the user thinking something's wrong.
Look into the old "feeds not updating" thread. There where like 10 people saying its not working ( including me ) and after someone posted that fix ( to simply higher the schedule_num ) none has every posted there again :)
*XiaN also pokes on #914542: The hidden variables should be editable via an admin setting page again :P*
Comment #10
alex_b CreditAttribution: alex_b commentedPlease. We have discussed this before. It should be clear that this is not going to peform and hence this is not a solution. If you do that and you have a very high number of feed subscriptions, you also need to adjust your max execution time and your max memory size accordingly. You'll see that you quickly get to numbers that aren't practical. High execution times will expose you to DoS attacks, the max memory size will be at ranges that you simply don't want to allocate for your apache processes (> 512 MB).
XiaN Vizjereij: could you please stop handing out this advice? I repeat, setting job_schedule_num is *not a solution*. It's not helpful to keep harping on it.
That said, Michelle: could you set it to 5000 and see whether this fixes your problem? If yes, we have another indicator to go on in order to figure out what is going on.
Comment #11
XiaN Vizjereij CreditAttribution: XiaN Vizjereij commentedOf cause you need to do that and there is nothing wrong with it.
You only need to
* Mention it somewhere in the readme. So that people know what they are up to, when they want to aggregate a large number of feeds
* Provide a way to limit these values somewhere in the drupal UI (!). Thinking behind it is : "Ok, the unlimited values to not work for me any more, i now need to override them with capped numbers"
But i can only say it again : The user expects that EVERY feeds updates on cron ( unless he explicitly says not to do so ) and that every item gets updated/created ( unless he explicitly says not to do so ). The user does NOT expect that only a few number of feeds get updated, that only a limited number of nodes get created/updated and that he has to edit those values somewhere deep in the settings.php. Btw. no other module i used so far required a manual setting in the settings.php
I sure can. But from 5 people on IRC and 3 friend of mines asking me why feeds is not working, 7 reported that my advice helped them ( fixing the problem ). They all had small amounts of feeds and unfortunately only the onces without new content got updated on cron. Which resulted in them thinking its not working ( and also why it worked on manual import ). The other one had his MySQL server dying from #625196: Fatal errors (Unsupported operand types) and warnings (Argument is not an array) in FeedsConfigurable spam in the watchdog :D
Thats why i keep poking that issue. Not to be rude or give wrong advice.
I think i would also help identifying the rare real problem with feeds on cron, when we could sort out all the "false not-working-as-intended" once.
Comment #12
MichelleWith help from Alex on IRC, I got my live site working. The trick was to change the feed refresh rate to something else (you can change it back again; just save in between) and then run cron 2, maybe 3 times. Running it just once isn't enough, which confused the heck out of me. LOL!
He wanted me to note my upgrade path since it seems to be upgrade related. Unfortunately, my upgrade path is messy. I started using it in December of 2009 which would have been either alpha 8 or the dev right before alpha 9. I was on a patched version for a very long time waiting on #632920: Inherit properties from parent feed node (taxonomy, author, OG, language) and I only upgraded feeds sporadically when it started getting horribly out of date because every upgrade required me to repatch it. I know I was on beta 5 and it was working fine there as it had been all along. I then jumped right to beta 9 and it broke. So my guess is it was in that jump that the problem happened.
Michelle
Comment #13
geodaniel CreditAttribution: geodaniel commentedI am seeing this issue on a clean install of Feeds (and the fast feed module), having had no prior versions of Feeds installed. Items got imported initially but then nothing new gets pulled in on cron.
Comment #14
alex_b CreditAttribution: alex_b commentedgeodaniel: grab me on irc, let's work through this issue.
Comment #15
geodaniel CreditAttribution: geodaniel commentedAlex, I'll try and catch you on IRC today. I tried out the tip you gave to Michelle, and updated the refresh rate for the feed. This morning I came in to find there are new feed items that have been pulled in, so it must have done the trick.
Comment #16
Thoor CreditAttribution: Thoor commentedToo bad - I am having the same problem.
No new content by running cron. Only manual.
I am also using 6.BETA-9 ( http://drupal.org/node/957654#comment-3651812 ) and I tried Michelles Trick under http://drupal.org/node/927782#comment-3623886 but for me this didn´t work.
Comment #17
HnLn CreditAttribution: HnLn commentedsubscrine
Comment #18
thomas_b CreditAttribution: thomas_b commentedSame problem, with:
Feeds 6.x-1.0-beta10
Chaos Tools 6.x-1.8
Job Scheduler 6.x-1.0-beta3
Running cron manually works.
Comment #19
Po3t CreditAttribution: Po3t commentedI am also having the same issue. I have all of the latest modules installed. Manual updates of the feeds work, but I can't seem to get them to update on cron, I've set up a cron job using cpanel with the following command:
cd 'my_file_structure_path' ; php -q 'cron.php' > /dev/null ;
I'm in the Drupal Support IRC channel as "Poet" right now.
Comment #20
comat0se CreditAttribution: comat0se commentedI'm having the same issue... brand new install. I create a feed and it will only pull in items if I do a manual import. I'd be happy to go on IRC to try and get this resolved. I have an hourly cron job that runs through crontab, and I've also tried drush cron, and cron from the admin_menu. No new items, unless I do a manual import.Sorry, now seems to be working for me. I basically uninstalled job scheduler and feeds and reinstalled them, and I also set the minimum time to refresh to "as often as possible" Resetting it to 30 mins still seems to work as well.
Comment #21
_sparrow_ CreditAttribution: _sparrow_ commentedSame with me. I run drupal 6.19, feeds in beta10. I built my website over alpha5 or near that locally, then upgraded to beta9 and moved the whole thing online. Then I sarted getting duplicate items on every cron run. After I uninstalled beta9 and installed fresh beta10, and assigned unique elements, both URL and GUID, I never got dupe again, but my feed stopped getting updated. The site runs one single feed now, it's a yahoo pipe. At first, I thought all troubles derrive from quirky URl format or perhaps standards that Yahoo uses. Then I burned the feed with Feedburner and nothing changed. I tried to run cron manually (click "run cron manually" on Status reports page?) – no new items.
So. I'm not getting any updates to my feed. What am I doing wrong?
Comment #22
zazinteractive CreditAttribution: zazinteractive commentedI am having the same problem on Drupal 6.20. Automatic updates used to work but now I can only get new nodes through manual import
Comment #23
Jim Kirkpatrick CreditAttribution: Jim Kirkpatrick commentedSubscribing...
Using beta10 since the get the get-go, feed updates (set to minimum 1 hour in Feed Importer settings) worked for 2-3 days, then I noticed the site is now about 24-48 hours behind in updates. Cron is set to run every 15 minutes. We have about 70 slowly updating feeds.
Did use Drupal Queue for a bit, but that+Job Scheduler is plain broke for D6 pending this patch being backported, so I uninstalled it.
Gonna delve into the code/deep settings.
Comment #24
Jim Kirkpatrick CreditAttribution: Jim Kirkpatrick commentedActually, I'm pretty certain this is a duplicate of #705444: Feed Nodes don't import on Cron with Feeds Beta7 + Job Scheduler.
What's strange is that I just copied the database from our live environment - which exhibits this bug - to my dev box and, despite the code and databases being the same the feed updates started working again. Immediately.
The only two differences then, since DB and code is identical, is the OS and PHP version and the use of SSL: my development environment on my Ubuntu box which runs PHP 5.3.3 without SSL, whereas our production & test environments run Debian Lenny, which has version 5.2.6 with SSL for admin & user pages...
Could it be that the various issues along these lines (this, #705444: Feed Nodes don't import on Cron with Feeds Beta7 + Job Scheduler, #959406: beta3 + Feeds = no automated job. etc) that Alex_b has no issue with, but other do, are simply operating environment differences? Are there any places in the Job Scheduler or Feeds code that could introduce this bug due to a difference PHP a version difference? Or does SSL louse things somehow?
UPDATE
Feeds on the test environment also started working after importing the database in backup/migrate. So the PHP verison/os is not relevant, but something that happens after restoring a database. Something happens after a DB import...
Gonna keep digging... (might be barking up entirely the wrong tree, but something odd this is going on...)
Comment #25
Jim Kirkpatrick CreditAttribution: Jim Kirkpatrick commentedOK, after importing the live environment's database back into the live environment, feeds started coming through. Hmm...
So I looked at the job_schedule table and saw ~480 rows. We have only 76 feeds, so including the housekeeping and a couple of other 'special' feeds, that's 79. So I truncated that table and manually ran
feeds_reschedule(TRUE)
and 79 rows appeared in the table.This appears to be a bug somewhere between Feeds and Job Scheduler because it seems deleting a feed node does not remove references to it from the job_schedule or feed_source tables. (Update: a manifestation of #797228: Deleted Feed records still in database tables)
Anyway a quick calc: 480 (rows) / 5 (feeds per cron) * 15 (minutes between crons) = 1440 minutes = 1 day. Which is about the time I'd not seen any updates for...
Could this be an issue for other people? I mean, if the job_scheduler table fills up with dead entries, could the cron scheduled tasks could spin blindly, either indefinitely or for long enough to give the impression of not updating? Could re-importing the db have cause the feeds/scheduler to start from the beginning of the table again, giving the impression of being fixed?
Not saying this is the only issue, but I'm fixed for now. Will keep an eye on it an report back...
Comment #26
beanymanuk CreditAttribution: beanymanuk commentedHi
I am trying to import a csv file and when this csv file is updated for the changes to be picked up and changed in the appropriate nodes.
I have set feeds to refresh to every 15mins but its not doing anything?
Also how do i manually run the cron job for feeds refresh
Pete
Comment #27
Jim Kirkpatrick CreditAttribution: Jim Kirkpatrick commentedPlease do not change active issues to another topic. If you need help, create another issue or search the issues list and documentation. And don't assign an issue to yourself unless you are personally going to manage and fix it! Good luck.
Comment #28
bmgrimes CreditAttribution: bmgrimes commentedSubscribing.
I'm having a similar issue. One of my importers works fine. The other is configured essentially the same way, but will not import anything on cron.
Comment #29
Jim Kirkpatrick CreditAttribution: Jim Kirkpatrick commentedHi bmgrimes, can you try the thing that fixed it for me? See #25 but essentially:
truncate job_schedule;
at MySQL command line or PHPMyAdmin)feeds_reschedule(TRUE);
(I just added that line to a page with PHP input format and viewed it)And let us know how that goes please!
Comment #30
bmgrimes CreditAttribution: bmgrimes commentedThanks a lot Jim, that worked perfectly!
It seems that the feeds I added to existing nodes weren't getting added to the job_schedule table. I think the feeds that were created with new nodes were updating properly. Running feeds_reschedule(TRUE) after truncating the table corrected the issue.
Comment #31
zazinteractive CreditAttribution: zazinteractive commentedMy job scheduler table looks normal but the posts are being imported. Have no idea why
Comment #32
kenorb CreditAttribution: kenorb commentedJob Scheduler issue: #959406: beta3 + Feeds = no automated job.
Comment #33
kenorb CreditAttribution: kenorb commentedLet's make some FAQ to track this bug.
First of all:
1. feeds_cron() doesn't do importing, job_scheduler_cron does.
2. For devs: If you removed the record manually from job_schedule, saving Feeds Importer form won't help, because you've to change 'Minimum refresh period' to different one (at: admin/build/feeds/edit/%/settings)
See:
3. If you use Devel, disable it.
4. For devs: Make sure that your cron is not locked out (especially when you did some die()'s in the code, it doesn't release the semaphore).
drush vdel cron_semaphore || variable_del('cron_semaphore');
5. To be able to import anything on cron, you've to have at least one record in job_schedule table.
Bug 1:
Even if you did the change of refresh period and feeds_reschedule() is run, it still doesn't create job_schedule row.
Bug 2:
No matter what refresh period you change, it's always set as 1h (job_schedule table).
By default job_scheduler setting the new job at the next period time. So if you set up every 15min, this job will be executed after 1h anyway (doesn't matter that you executed the cron manually).
Theoretically you can shorter that, by executing following query:
Comment #34
kenorb CreditAttribution: kenorb commentedThis bug fixing Bug 1, described in #33
Comment #35
kenorb CreditAttribution: kenorb commentedPatch fixed Bug 1 & Bug 2, described in #33
Comment #36
kenorb CreditAttribution: kenorb commentedComment #37
Jim Kirkpatrick CreditAttribution: Jim Kirkpatrick commented@kenorb: thanks for the updates... I can't test the patch for a while but will do as soon as I can.
Don't forget bug 3 also affecting people here as I alluded to in #25: #797228: Deleted Feed records still in database tables - It's quite possible to have hundreds or thousands of orphaned job_scheduler entries...
Comment #38
kenorb CreditAttribution: kenorb commentedI think the configuration is very confusing.
I typed URL in the Description by mistake. Then I was looking half an hour where I can set up the URL in Feeds Importer.
Finally following the wiki page: http://drupal.org/node/638804
I release that there is some separate page /import
Where you have to import it manually.
I thought it will be automatic.
Then even when you import it and run cron again, still nothing happen.
So crazy.
Comment #39
kenorb CreditAttribution: kenorb commentedTo those who didn't import:
http://drupal.org/node/638804
Try: /import
Don't forget to choose Parser, XML wasn't working for me, I chosen CSV.
Make sure that you have write permission to files.
In my case looks like something being imported.
I'll test as well if it does work on cron.
Comment #40
ransomweaver CreditAttribution: ransomweaver commentedI'm still trying to understand what should happen when cron runs a batch from an import.
If my feed has 2000 items, and my batch is 150, and my feed update period is "often as possible", and cron is set to every 5 minutes should it
a) iterate through all 2000 in batches of 150, with each cron running a batch, or
b) each cron processes 150, but because I have a period of "often as possible", every time cron has feeds look at the feed it thinks everything needs to be processed again, meaning all the things that were batched in the previous cron get batched again, leading to an ever growing queue?
I'm hoping for a obviously, but I'm not confident.
And of course the feeds import form manages to run the entire import in one long batched process. Does anyone have instructions or an idea as to how to achieve this on a single cron? That would be much more to my liking than these 5 minute interval small batches, with a feed that I know will be refreshed once per day at a known time.
Comment #41
kenorb CreditAttribution: kenorb commentedI achieved cron job by testing CSV, but XML parser looks like it doesn't work at all.
I've downloaded Simplepie as well, no difference.
Comment #42
HLopes CreditAttribution: HLopes commentedI've performed a full reinstall of job_scheduler & feeds, and everything seems to be working ok.
Just:
Uninstalled (both feeds and job_scheduler)
Deleted everything (folders)
Enabled job_scheduler + feeds + feeds admin ui (in this specific order, and step by step - i've read in another thread that problems can arise when a dependent module is not enabled previously). I don't recall if i reinstalled Chaos Tools, but it's possible as i was having issues with Context also, so if you want to be sure, include that as first on the list, as listed below:
- Chaos Tools
- Job Scheduler
- Feeds
- Feeds Admin UI
Avoid enabling all at once, enable one at a time.
Working with
- Chaos tools 6.x-1.8
- Feeds 6.x-1.0-beta10
- Job Scheduler 6.x-1.0-beta3
Comment #43
kenorb CreditAttribution: kenorb commentedOk, in my case my XML was not well-formated as Atom feed.
I've installed: http://drupal.org/project/feeds_xpathparser
If you have similar issue, check using some XML validator:
http://validator.w3.org/
http://www.validome.org/xml/
http://www.w3schools.com/xml/xml_validator.asp
etc.
Make sure that you XML file starts with proper xml tags (<?xml ...?>)
I think, there should be at least some errors informing that you XML is not right.
In my opinion following issue is too generic, so if you have similar problem, please raise a new ticket with more details.
Created new tickets:
#1116804: Provide some messages and logs if feed file is not well-formed
Comment #44
kenorb CreditAttribution: kenorb commentedComment #45
XiaN Vizjereij CreditAttribution: XiaN Vizjereij commentedIts still one of the stalking problems on feeds. Lets keep this open so other people can find help here.
Comment #46
XiaN Vizjereij CreditAttribution: XiaN Vizjereij commentedWrong status >.<#
Comment #47
EvanDonovan CreditAttribution: EvanDonovan commentedActually, this should still be at "needs review" because the patch at #35 still hasn't been committed to the module. I don't think it should be "needs work" since the patch is not proven to have issues yet.
Comment #48
mshepherd CreditAttribution: mshepherd commentedConfirmed that the patch at #35 gets feeds items importing on cron run.
Comment #49
mrfelton CreditAttribution: mrfelton commentedAlso confirming that #25 fixes the issues with cron.
Comment #50
snez CreditAttribution: snez commented#35 alone did not fix this for me, but I did get around this
The reason was that drupal_queue was not installed, which makes a difference in the job_scheduler:
$num = module_exists('drupal_queue') ? variable_get('job_schedule_queue_num', 200) : variable_get('job_schedule_num', 5);
So if you have more than 5 cron jobs scheduled, only the first 5 would run.
Either increase the default in the code or install drupal_queue
Comment #51
meecect CreditAttribution: meecect commented@snez, where did you put this code?
Comment #52
maximpodorov CreditAttribution: maximpodorov commentedCould #35 be commited? It fixes the problem.
Comment #52.0
HLopes CreditAttribution: HLopes commentedPermissions
Comment #53
Dane Powell CreditAttribution: Dane Powell commentedI'm pretty sure #35 fixed the problem for me as well - I say 'pretty sure' because I applied the patch, re-saved my importer, ran cron manually, and nothing happened. But the next time cron ran after that, it did work. Weird.
Comment #54
ellanylea CreditAttribution: ellanylea commentedConfirming that patch #35 worked like a charm. Whether I manually run cron or schedule cron, the feeds now get imported.
Please commit. Many, many thanks!
Comment #55
twistor CreditAttribution: twistor commentedA few things:
+ $this->config['import_period'] = $values['import_period'];
is not needed at all.$this->schedule();
duplicates what happens in feeds_reschedule().That said, I agree that we should move scheduling of importers to submit and remove it from feeds_reschedule().
See #1446516: Feeds begins automatically deleting nodes for some ideas.
Comment #56
Dane Powell CreditAttribution: Dane Powell commentedThis is just a repost of #35 in Git format.
Comment #57
anisaM CreditAttribution: anisaM commentedHI there is the above patch part of 7.2 dev. Or do i have to patch it? . I am having the same isssue with the feeds not imported on cron. Iam using feeds 7.2 apha8
Many thanks
Comment #57.0
anisaM CreditAttribution: anisaM commentedopen editing
Comment #58
twistor CreditAttribution: twistor as a volunteer commented