Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Ok really need someone to help me out here

i'm running CentOS on a VPS with Plesk installed

I launched a new website which gets a couple of hundred visits a day (nothing crazy) but have been plagued with performance problems.

The VPS has 768MB of RAM and has been hitting 90% of this pretty quickly.

The site runs on wordpress under fast-cgi and apc is installed and working correctly.

I'm seeing lots of "Premature end of script headers:" and "Software caused connection abort: mod_fcgid: ap_pass_brigade failed in handle_request function" errors in the error logs which I think manifest as 500 errors on the frontend.

I'd love if someone could give me some tips on linux memory management:

1.) I've currently set php memory to use 512MB of memory and increased max execution and input times to 1600 seconds. 2.) APC is set to use 48M memory 3.) I'm not sure what memory allocation fast cgi has

  • should I increase apc memory?
  • is there a way of controlling what memory fast cgi can access or will it just use the 512 defined in php.ini?
  • I've heard there are problems using fast cgi and apc - would this be causing my performance problems?

Any pointers greatly appreciated.

Thanks,

Ed

share|improve this question

1 Answer 1

The "ap_pass_brigade" message is a harmless red herring -- see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=537922.

Depending what numbers you're reading to get that 90%, it may also be harmless -- in particular, the 'used' figure in 'top' includes the kernel's cache buffers to speed up file access, which it will cheerfully reduce when something else needs the memory.

But "Premature end of script headers" means your script is for whatever reason not completing and doing its job. Is there more information in the logs? Is the script starting at all -- can you insert a print statement (to stderr) and see it show up in the Apache error log? Is there anything in suexec.log? -- some problems that cause this will show up there.

share|improve this answer
    
thanks for the heads up on the red herrings afraid that's all I've got on the premature end of script headers. I'm gonna see if I can debug –  Ed Bloom Jul 1 '10 at 18:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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