Thursday, 10 May 2012

Drupal cron stopped working after site migration

Have you recently moved your Drupal website to a new server, and all of a sudden Cron has stopped working, and all your jobs are timing out, or locking up?

That has recently happened to me.

First of all, I will point out that I am using Drupal 7, and we are managing a number of jobs using the Ultimate Cron module, which as you may know, is dependant on the Background Process (and Progress) module(s). We migrated our site from a test server to a live server, with identical setup, and all of a sudden, our cron jobs packed in. I couldn't run them automatically, manually, externally, with drush or even from the root shell.

For a day I struggled. With every CRON setting I could imagine.

Then, whilst manually trawling through the system and variable tables in the database I discovered the following setting:

background_process_derived_default_host | a:1:{s:7:"default";a:1:{s:8:"base_url";s:20:"http://test.desynit.com";}}

http://test.desynit.com is the name server of test site (obviously). This is not the path of the live server.

So I leapt into the admin config for the BACKGROUND PROCESS module, and lo and behold, there it was..

I clicked "Determine default service host" and this was instantly updated to the new correct base_url for the live server, and away you go!

Full cron ahead.

I hope this helps someone out.

2 comments:

  1. Hello Simon, I´ve read your post several times in my desperate search of answers to all my novice questions about integration of drupal and salesforce. I had no luck for what i think must be basics: why when I delete a record in SF, the corresponding account in drupal doesn´t disappear? or how to trigger actions (rules) when a new -for example- user is created?
    Could you point me in the right direction? where to read from, tutorials... anything would come handy.

    Thanks a lot, I´ll follow your blog.


    nico

    ReplyDelete

  2. Amazing Article! Your informations like a charm. I have read 3 books on Android app development , nowhere I can find these instructions. Lots of thanks for this excellent tutorial. You saved my time hours. THANKS. Do you know about any App Development companies in Dubai?

    ReplyDelete