I constantly receive 500 Internal Server Errors on my Drupal site. By constantly, I mean 3-4 times out of 10 clicks; sometimes 1 out of 3 clicks. It happens to all our members so it is not a browser problem. It happens clicking on links and submission buttons.
The site is on a commercial server. The php.ini shows memory=64m.
Tech support says the scripts are exceeding the allowed resources...
"500 errors on your website are usually caused when a script exceeds the allowed resources or execution time. I have checked the server logs for your account and see that two such timeouts occurred today. The script(s) hit 56% and 20% CPU usage respectively. The logs do not indicate which script(s) consumed resources or why, but you may wish to take a look at the code and see if there are areas that can be tightened up."
All I have on there is Drupal. What would cause the Drupal scripts to use that much resources?
Ashford
Comments
post
what version drupal and what modules and versions you are running? how many users and how much traffic do you have?
what php and mysql versions?
what performance settings did you set?
re: details about the site with the server error
Processor: Pentium 4 3.06 GHz
Memory: 4 GB
Hard Drive: 2 * Seagate SATA 250 GB
Bandwidth: 1500 GB
Operating System: FreeBSD 5.x
PHP 4 + Perl 5
MySQL client version: 5.0.45
Drupal 4.7
When I tried Drupal 5, a lot of my modules would not work because they required PHP 5.
amazon tools, audio, calendar, captcha, cck, ecommerce (donation), event, gmap, image, imce, invisimail, janode, link, location, masquerade, mimemail, notify, pathauto, signup, simplenews, spam, tinymce, token, views, webform,
Low traffic. Never more than 2-3 members on at the same time.
It's a small volunteer organization -calendar, newsletter, announcements, recommended links.
In the WatchDog, I do see a lot of lines for Visitor that looks like it could be a script just running through a series of files. It shows File not found or No access for 6-10 files in a row.
warning page not found 01/31/2008 - 7:06am articles.php not found. Visitor
warning page not found 01/31/2008 - 3:20am guestbk.php not found. Visitor
I don't even have the guestbook module.
I appreciate all of you using your time to help me. ---Ashford
what version of php 4?
what version of php 4? drupal 5 will run fine on php 4 I have done it.
also what are you performance settings in drupal admin?
do you have a test server? if not, set up a desktop to run a matching install so you can test your changes before you add to your production server.
also how often are you running cron?
i would suggest using drupal 5. it is way better than 4.7.
the other suggestion would be to turn off all modules and start testing if you get the error.
then turn one on at a time.
re: troubleshooting server error -performance settings
The one big problem I had running Drupal 5 was the module that automated the Google map links when you put in the address would not work on PHP4. It was either map, Gmap, or Locations that required PHP5. I rely heavily on the map links, since the main use of our site is announcing volunteer projects and training events. We cover a whole county, plus several small communities in the bordering counties.
Are there alternatives for getting the map links, short of doing a Google map search and creating the link manually? My users have minimal computer experience. I have to make everything as no muss, no fuss as possible.
Performance settings:
45 3 * * * /usr/local/bin/lynx -source http://mydomain.org/cron.phpCron Admin settings says cron last ran 3 days ago. And, that's when I ran it manually. Obviously it is not functioning properly; however, not running at all would not cause the resource overload. Would it?
PHP Settings altered
In settings.php, added this line when searching the Forum to troubleshoot another error with finding path to
include_once './includes/bootstrap.inc';ini_set('register_long_arrays', 1);Same includes issue...added the path to the php.ini
I've never done a desktop test server site. I will search the Drupal site for instructions.
I do like your idea of testing each module one at a time. If I do that on the desktop server site, what would I be able to infer if the modules did not cause any errors?
Ashford
I had the same thing happen
I had the same thing happen to my site i manage on a 4.7 installation. I was on Dreamhost and would get almost every click being a 500. Dreamhost said it was php scripts timing out on their execution. They never properly shut down.
Moving my site over to the 5 branch and to a better server made it infinately better. Mind you i was trying to support 1000+ users at any one time on a shared host :">