I have been having intermittent page not found errors on a few of my drupal websites that are sharing the same installation, and using multisite. The error in the log is the 500.shtml error, and it happens on every page regardless of content type. Apache is kicking back "Premature end of script headers" as the internal server error. Based on research it appears that it is a perl script problem, but I was wondering if there is a setting I can change to rectify this in Drupal.

Thank you in advance for any assistance.

Comments

brokensanity’s picture

Title: Page Not Found 500.shtml » "Premature end of script headers" Making my site unbrowseable.
Priority: Normal » Critical

As an addendum, I want to mention that this is only effecting one out of 3 of my drupal installations on my server. It is making my site unnavigable.

Further research shows something about symbolic links causing the problems, but I haven't found a consistent fix.

This problem has only been prevalent since about 3 weeks ago. There was no change to modules or themes during this time, and I am having a hard time diagnosing what the real problem is.

Please Help!

goobermaster’s picture

Your issue may not be the same as mine, but in my case it was only bad html in the content.

One of my entire Drupal 5 sites went 500 after submitting content that had a <p instead of <p>

After screwing with memory limits, .htaccess, and more - the fix was as easy as accessing the content in phpMyAdmin.

brokensanity’s picture

If it were one of my drupal sites, I would think this to be the case, but I am using 1 drupal install for a group of sites, and that makes the problem far harder to diagnose. I will definitely pour through phpMyAdmin, and see what i find.

Thanks for the tip.

brokensanity’s picture

Title: "Premature end of script headers" Making my site unbrowseable. » index.php is using 80MB VM

The verdict from my host is that index.php "is using large memory usage (80MB)" as follows:

Tue Oct 7 17:35:41 2008 lfd: *User Processing* PID:1085 Kill:1 User:****** VM:74(MB) EXE:/usr/bin/php CMD:/usr/bin/php index.php
Tue Oct 7 17:37:38 2008 lfd: *User Processing* PID:2225 Kill:1 User:****** VM:80(MB) EXE:/usr/bin/php CMD:/usr/bin/php index.php

Has anyone else experienced this problem?

ainigma32’s picture

Status: Active » Postponed (maintainer needs more info)

Since index.php handles all requests for Drupal that doesn't really narrow it down. Can you or your host provide the full url with parameters of the request that is killed?

- Arie

ainigma32’s picture

Status: Postponed (maintainer needs more info) » Fixed

Looks brokensanity won't be posting any feedback so I'm setting this to fixed.

Feel free to reopen if you you think that is wrong.

- Arie

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

ekrispin’s picture

Status: Closed (fixed) » Active

We have exactly the same problem bothering us in one of our websites - the same version and details.

ainigma32’s picture

Status: Active » Postponed (maintainer needs more info)

Well the the same goes for you: please provide the full url and parameters. AFAIK you should be able to find that in Apache's logging.

- Arie

ekrispin’s picture

No full URLs in the logs, just the following messages:

2009-01-06 12:05:34 procwatch2 INFO: Process(pid=7129, name='php5.cgi', uid=gurusfeet(1782756), tty=None, cpu=4.0, rss=48972.0, vsize=102480.0): kill for total RAM

And endless messages for various pages in the sort of:

[Fri Feb 06 01:32:41 2009] [error] [client 122.162.68.197] Premature end of script headers: index.php, referer: http://www.gurusfeet.com/
[Fri Feb 06 01:34:25 2009] [error] [client 84.229.174.17] Premature end of script headers: index.php, referer: http://www.gurusfeet.com/opinion/proportions
[Fri Feb 06 01:40:06 2009] [error] [client 84.229.174.17] Premature end of script headers: index.php
[Fri Feb 06 01:40:48 2009] [error] [client 84.229.174.17] Premature end of script headers: index.php, referer: http://www.gurusfeet.com/shondoo
[Fri Feb 06 01:49:04 2009] [error] [client 195.92.40.49] Premature end of script headers: index.php, referer: http://www.google.co.uk/search?hl=en&safe=active&q=www.parmarth.com&star...

brokensanity’s picture

It had been months since anyone even looked at this... So i thought it was hopeless.

My solution was to switch my drupal to a different server with the same host.

Sorry I couldn't be more helpful.

ainigma32’s picture

@brokensanity: No problem, thanks for updating the issue.

@ekrispin: Took a look at your site and I noticed that you are way behind on updates. Could you try upgrading to the latest (and safest) version and post back if that improves the situation?

- Arie

ekrispin’s picture

The problem disappeared one day in the same way it appeared - it just did. No change in code, no change by the hosting.

The only thing done that might be relevant is that some posts, among them very long ones, were deleted.

We are going to upgrade. I will report if anything relevant happens.

ainigma32’s picture

Status: Postponed (maintainer needs more info) » Fixed

Ok I'll set this issue to fixed for now.

Feel free to reopen if you think that is appropriate.

- Arie

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.