1
votes

I am using Drupal 6.19 with quite a lot modules. Since I added another domain using Domain Access, added a panel variant and a node type, the cron first exhausted the memory limit of 512MB. I increased this limit to 1024MB. After I have done that, the "Maximum execution time" of 240 seconds is being exceeded.

Any ideas? What additional information shpould I give?

Thanks

Lukas

3
Holycrap your cron requires a GIGABYTE of memory? That's sick!! Even for Drupal standards, that's a lot =)Rudie
Yes, it`s insane. I use some modules that really make me think that they should be rewritten...luksak
How is the speed for the rest of the website? 4 minutes for every page load? =) Drupal requires a lot of memory for caching. If that's only necessary for the cronjob (every 4 hours?) it's doable if the rest of the website needs only a few MB.Rudie
Average load time is 1s. I make heavy use of caching.luksak

3 Answers

4
votes

Try to look for croon implementations in your modules. Disable each of these (separately) temporarily too see if it makes any difference.

Maybe a module is running in some kind of loop. A possible candidate would be search.module, that lodas all comments of a single node. If you have nodes with thousands of comments (forum posts), that could be causing this.

1
votes

Look inside: includes/common.inc Line: 2716

Change the set_time_limit to a higher number such as 400.

Hope it will help someone.

Finau

0
votes

You should be able to raise the max execution time with set_time_limit() but I think it would be good to find out what your script is doing for four minutes!

I don't know much about this drupal script but would suggest the following:

  • Keep an eye on the database while it's running, I'm guessing that slow MySQL queries are likely to be the primary cause of it running slow
  • If slow queries aren't the cause setup some kind of profiling (would recommend xdebug + webgrind for something simple), set_time_limit() to something really high and run the script. Use the profiling data to see what's so slow and then work to optimise it.