You are hereCreate Content / Cron Errors

Cron Errors


By gfox - Posted on 06 March 2010

I'm having a strange problem on some of my Drupal sites. Hourly a cron job runs to rebuild caches and do regular maintenance. This is something every Drupal site needs.

Some time in the last 6 months I was finding that cron would get stuck and not complete in the hour. Another would get started and block. Eventually my webhost stopped spawning processes for my user which lead to weird errors on my web page (page not found errors).

I was logged in as me, not the uber administrator when I started messing about. I cleared the cache tables, including the cache_menu table. I was planning on rebuilding the cache table, then the menu system. I was logged in with the wrong account, and I couldn't remember the administrator account. Since I had thrown out the menu system, I couldn't navigate to the lost password page.

I had royally messed up my site.

I fixed it by going into the DB and copying the known password from one user to that of the administrator account. I logged in as administrator, ran cron.php manually, then hit up the page to rebuild the menu system.

So far so good. The next day I ran into this tip: How to reset the password of user 1. A little DB query action to set the administrator account password.

I am still having the weird cron blocking issue though. Every couple days I just log in to my web host and kill the running processes and then everything runs fine for a bit. Bandaid solution that is labour intensive.

I can't figure out how to debug cron issues in drupal though. I've read some tips that running update.php can reset things, but that didn't work for me. I've read this page that suggest modifying core files to add more logging about which module is running cron. I think that will be my next step.

Twitter

    Latest comments

    • gfox says 'I didn't come across many people that day, but Who...' in Trillium Ridge
    • Ladders (not verified) says 'Was there many people on the track? I have heard t...' in Trillium Ridge
    • The Wife (not verified) says 'It's hard to believe because it's only be two year...' in Birthday Years
    • gfox says 'He looks huge, partly because he is wearing all hi...' in Centre Toonie
    • Jason (not verified) says 'My dad tried that I think. With string and a door....' in Centre Toonie
    • gfox says 'Hey Cathy, I hope to see you in two weeks too! ...' in Lofty Beast
    • Cathy (not verified) says 'Hi Greg I did the 140 kms last year and will be d...' in Lofty Beast
    • jeff smith (not verified) says 'I appreciate this you are doing a great job (Y). ...' in Regularly Eligible
    • Sam Ho (not verified) says 'Hi Sue, Thank you for calling to helping your d...' in Regularly Eligible
    • Jen (not verified) says 'What a great time you guys had! I think Todd & Lai...' in Camping Sparkle