One of my drupal sites is causing some problems:
1. 500 server problems where the page isn't displayed and other times it is displayed
2. pages that are there don't appear but go to my "page not found" page of drupal.

it seems that there is a Premature end of script headers on index.php

Asked my host about it and they tell me:

"Your account exceeds cpu/memory usage limits:

Sun Jan 22 17:59:02 2006: Script: '/home/mydomain/public_html/index.php', Domain: mydomain.com, Request: '/admin/help/system', Accessed from: -ip-number- - of mydomain using >16 MB Memory

You need to upgrade your account to higher package or optimize the scripts."

What can be done to optimize my drupal site instead of having to take a higher package?

Can anyone help?

Comments

Eagle-i’s picture

Also as this started happening i noticed that the poormans cron module started sending notices every 10 minutes while it is set for every 6 hours.
For some reason it started doing that and i don't know why.

bryansd’s picture

Here are my two suggestion.

1) Disable any modules that you are not using. We all have a habit of "testing" modules, not using them, but then not disabling them either.
2) I would staggar the cron/aggregagor so they're not running more than once an hour. For example if you're using the aggregagor, have one feed update once an hour, maybe another every 90 minutes. If you know a feed doesn't upate more than once a day...set that feed only to be updated once every 24 hours. Also, I wouldn't run your cron at intervals more than 30 minutes (mine is set 60 minutes).

Everytime that cron runs...all the processes and modules needing cron are run...thus likely your CPU problem. I have my cron only running every 60 minutes. You might want to check and see if you have it set for 6 hours and not 6 minutes. If it is set at 6 hours...your "Retry interval" is likely 10 minutes and could be also be changed. Something in your modules is not running correctly...or the CPU limit itself...is causing the cron not to finish. Are you getting any errors in your logs on the administrator page?

If you are intending the cron to run every 6 minutes...I could be wrong (I'm not a developer), but from what I observed any content you add (page, blog, etc) will be updated on your pages after submitting them...cron does not affect this. Your users would likely only notice for example aggregagor feeds from sources outside your site not updating as quickly by increasing the run cron time. Content they add should still be "up to date".

By the way, my answers assume you haven't made too many of your own mods to Drupal. For example, removing the code for LOCKED TABLES. (Though I do that for one of my "personal family" sites too...it can cause performance/database problems).

Good luck...hope my suggestions get you one step closer to solving your problem.

Bryan

Drupal Sites Coming Soon:
CMSReport
Drupal Blog (on WordPress) at:
Like that Idea
New SMF Site:
WebCMS Forum

Eagle-i’s picture

Thanks for your input Bryan.

The cron was set to 60 minutes and should not have caused a problem. I noticed it repeated itself as you said it might not have finished it's previous job.

Update
I removed quiet a number of modules that might overload cpu activity such as having to load different modules at the same time or refer to them. Now that's my assumption as i am no code techie.

However, it had immediate impact:
the site could be loaded again. I had to reset all the blocks as they for some reason were all deactivated, so only the body appeared.

The cron works again as it should.

So, I can't really pinpoint the reason for the cpu overload but only refer to the effect of the changes i made to which modules to not use anymore.

Thanks again for your time and input :).

Tim

bryansd’s picture

Glad I could help. Usually my efforts just cause confusion. :-)