1

In Drupal 6, whenever I run cron from web interface I get an Internal server error and when I run

drush cron 

I just get

Segmentation fault

What can be wrong here and how can I fix it?

3 Answers 3

4

It sounds like a resource problem. Memory limits tend to be the culprit.

Check to see that drush is using the same php.ini file your site is.

drush status

Tells you what php you are using for drush.

Running the following will give you memory output information when running cron

drush cron -d

if that memory stack is near what your php.ini limit is.. raise it up an integer of 32Mb. (i.e. 128mb to 160mb) and then test again.

6
  • This happened to me not long ago, in preconfigured VM's I had to work with, when I am in devel mode, especially with theme_devel enabled. I simply pushed up memory setting in php as this answer states at the end. Commented Dec 20, 2011 at 9:11
  • 1
    The first bit of advice is important. I have seen system installs where the web and CLI versions of PHP have different ini files.
    – mpdonadio
    Commented Dec 21, 2011 at 0:15
  • Well, drush uses /etc/php5/cli/php.ini. I set memory_limit=512M and retried after issuing 'drush --yes vset cron_semaphore 0' (otherwise cron would not run). But now after issuing 'drush cron -d' I still get a bunch of bootstraps which end up with: 'Initializing drush commandfile: user [0.29 sec, 42.79 MB] [bootstrap] Segmentation fault
    – alfish
    Commented Dec 21, 2011 at 15:20
  • I had the same problem with a 5.x version of drush.... downgrade to 4.6 and see if you are getting the same error.. Commented Dec 21, 2011 at 23:08
  • @PhiloSurfer I'm using drush 4.5.
    – alfish
    Commented Dec 22, 2011 at 0:02
0

After starting cron from the web interface check your apache access and error logs for more information.

When starting cron with drush, make sure you have xdebug installed. It can record traces, memory usage and give you a stack trace in case php crashes.

1
  • Well, I am using nginx+php-fpm, not apache. Can I still install xdebug? How?
    – alfish
    Commented Dec 21, 2011 at 15:21
0

According to Metaltoad, Views (among other modules that execute regexs with preg_match()) can create runaway regex's that eat up memory and cause segfaults because preg_match() can't prevent backtracking overflows.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.