cpsrvd fails, server misconfiguration errors

Kelmas

Well-Known Member
Nov 6, 2006
121
0
166
Lithuania
Today I see cpsrvd failed in service stats and sometimes HTTP returns "Server misconfiguration errors". WHM doesn't work then. Starts working only after service cpanel restart.

I also see this in error log:

(12)Cannot allocate memory: couldn't spawn child process: (various php script names)

Any help?
 

jack01

Well-Known Member
Jul 21, 2004
200
0
166
I am having this issue too, and I know this post is a few months old, but there has been no reponse so far so I thought I'd revive it.

I get many entries like this in the error logs:

(12)Cannot allocate memory: couldn't spawn child process: /home/<someusername>/public_html/<somescript>.php

This is the first time I have noticed this on our servers, all have phpSuExec...?

Anyone got any ideas yet?
 

AndyReed

Well-Known Member
PartnerNOC
May 29, 2004
2,217
4
193
Minneapolis, MN
(12)Cannot allocate memory: couldn't spawn child process: /home/<someusername>/public_html/<somescript>.php
The message is self-explanatory. It seems that you have resource (memory) restrictions in place for Php scripts? In this case, you should increase the value of the memory_limit variable in php.ini. When done, /scripts/restartsrv httpd

Read more about HowTo: Tweak php for maximum execution at:
http://servertune.com/kbase/entry/88/
 

jack01

Well-Known Member
Jul 21, 2004
200
0
166
ServerTune,

The message is not that self explanatory with regard to how it can be resolved. When you suggest simply changing memory_limit in php.ini this affects individual scripts and their executing memory limits. However for a period of a couple of hours, all php scripts across the server failed with the aforementioned error, therefore it was not simply some script which was using more memory than allowed by memory_limit, there must have been a more general memory issue of some kind.

When done, /scripts/restartsrv httpd
no, with phpSuExec you dont need to restart apache after changing php.ini...

Anyone have any other ideas?
 
Last edited: