Hello I have a few feed from a few sources and they don't seem to be updated. I have cron running every minute and I do not see any errors in the logs. I have manually tried to update them and new new items were added even though I know there are new items. Does anyone have any clues as to where I should look? Apache error log has no errors, drupal watch dog has no errors. Is there any sort of debug mode I can turn on?
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | simplefeed-remove-cache.patch | 2.66 KB | csevb10 |
Comments
Comment #1
mfer commentedTry the DRUPAL-5 branch from CVS? There are some bug fixes in there that may solve your problem.
Does this only happen on some feeds while others update without a problem?
Comment #2
dsnydernc commentedHaving the same issue here. Cron is running just fine, feeds update manually - but not automatically. I have it set to update feeds every 15 minutes, but it's a no go.
Using the latest 6xdev.
Comment #3
mfer commentedFrom what I understand, this is happening in the Drupal 5 branch as well. If you have any details please provide them. I'm going to try and write up some code to track what's going on at some good test points and launch it on a site to model what's happening.
Comment #4
csevb10 commentedWhen refreshing a feed manually, it does not matter how long ago the feed was refreshed, it will always pull new results if it finds them. When refreshing a feed via cron, a feed will only refresh every so often based on your settings for that particular feed.
If you check the feed edit page you will see an area called "Feed Settings" and, under that, a field called "Check feed every". By default this period is an hour, so your feed would only be refreshed every 4th cron run (if set to run every 15 mins, every 60th cron run if set to run every min, etc).
Simulating the conditions (using Drupal 6), feeds refresh correctly on cron once an hour has elapsed since the last cron run, but will not refresh (nor show status messages) until that period has elapsed.
Could this be the issue that you are encountering?
A relatively simple check for this (if you can update mysql directly) is to revert the checked date back to 0 before running cron. If you do this, and your feed does _not_ refresh correctly on the next cron run, please post any further details you might have that could expedite fixing this issue. Thanks!
Comment #5
mfer commented@csevb10 - There has been a problem with feeds not updating when they are supposed to. That was the reason for http://drupal.org/cvs?commit=125012. It looks like that may not have corrected all the problems.
Comment #6
csevb10 commentedOk. I've replicated the issue at this point, and I'm researching the solution.
Comment #7
csevb10 commented@mfer: Sorry, got pulled into a 3 hr meeting, but I did a little more research, and the problem seems to be unrelated to manual or automatic refreshing of the feeds in my tests. It appears that the actual issue is with feed expiry. The cache is set for an hour term by default from simplepie (since we're now using their caching methods). As a result, regardless of the period that you set as a user, your feed will be cached for an hour. This might cause minor race conditions if the values are set to the same value (15 min interval, say, for both the feed and the simplefeed cache), but even then, the cache timeout would at least coincide with the refresh period. The simplest solution is probably to wipe the hash value whenever you re-save the feed node, and set the timeout to coincide with the selected period. I'll do a little more work on this and let you know.
Comment #8
csevb10 commented@mfer: Ok. I'll put together a patch and ping Ted to review it tomorrow. Clearing the hash is the easy solution to forcing a feed refresh, but it orphans cache files, so it's obviously not the preferred solution. Right now we're running 2 timing methods side by side: ours (refresh + checked) + simplefeed's (mtime). I'll check if there's a good way to do a cache flush tomorrow so that things sync well and put the patch together. Thnx.
Comment #9
m3avrck commentedActually, maybe we can remove the local SimplePie file cache support stuff now.
Way back in 1.x, we used SimplePie cache locally for the feed. SimplePie checked that cache locally and requested the feed to see if change. Cost = file lookup + HTTP request
Now, in 2.x, we store a hash of the feed. If we remove SimplePie cache, we still have our HTTP request, and just compare that to the stored hash.
In theory should run a bit faster, and be simpler setup.
What have you Bill and Matt? :)
Comment #10
m3avrck commentedScott seems to be in favor of removing SimplePie cache too... he wrote this to me:
Comment #11
mfer commentedI'm in line with what Scott and Ted wrote. It would be simpler and faster to remove the cache and it would be one less place our problem of not updating could be happening.
I've also used something like
when I've been testing. This might be a good idea to put right into the module. Thoughts?
@csevb10 - are you still up for rolling a patch? If not, I'll volunteer.
Comment #12
csevb10 commentedSorry. I totally dropped the ball on this one. Got busy and forgot to follow up.
When I traced it back the issue was that, if a cached file existed, then the hash always came out equal to the previous data ($process_feed->hash). $feed->data hash is always equivalent to our old hash (since $feed->data is set to the cached version of the file which we created our old hash out of).
I'm down with removing the file caching (I definitely think it simplifies things when viewing the code and our hash validation will 1. work correctly and 2. should be adequate). I've attached the patch for Drupal 6, and all the changes are very straightforward. Just checking to make sure we're all on the same page and that I'm not missing something. If you want me to roll the D-5 patch, let me know. It's pretty quick and easy.
I didn't include the change of the if-else statement, so if we want to include that, we'll just need to roll a slightly larger patch.
Comment #13
m3avrck commentedLooks good to me. Just need to update the comments for that function to remove $cache_path tho, otherwise commit away!
Be sure to update README.txt with fix.
And definitely backport this to Drupal 5 (should be same fix) since that is broke too, thanks!
Then we'll test it a bit and put out a new release.
Comment #14
Scott Reynolds commentedSeems like a straight forward change. Be great to add the extra else though to the if($success) block. Not totally convinced this is whats causing the error (though I think its the most likely suspect). Extra else gives more output on failure which is (Y)++ in my book
Comment #15
m3avrck commentedBill if you don't have time to do that this week let me know and I'll roll and commit patches. We need to get this live on a few our of sites.
Comment #16
csevb10 commentedI should be able to do it tonight, probably later today. :-)
Comment #17
m3avrck commentedw00t!
Comment #18
csevb10 commentedOk, this has been updated along with the readme for D5 & D6 branches. It has *not* been updated for 5--2-2 or any of the tagged revisions (which I believe is as expected). Perhaps we can now test, and then log issues back in here as necessary.
--Bill
Comment #19
m3avrck commentedYa there is only the DRUPAL-5 and DRUPAL-6 dev branches.
We can test those and if not issues make an official DRUPAL-5--2-3 tag release and for 6 too.
Comment #20
m3avrck commentedCommits look good Bill!
One issue, in D6 you added
We should prob add to Drupal 5 too. After that feel free to close ticket! We'll reopen if these issue comes back up, I'm testing it on a live site right now.
Comment #21
csevb10 commentedDone & Done.
Comment #22
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #23
m3avrck commentedWe're still seeing this issue on our sites...
Comment #24
m3avrck commentedSeems to be related to Feedburner: http://drupal.org/node/307686