Page 1 of 1

How to disable Apache / PHP from generating coredump?

Posted: 2008/06/30 04:41:01
by rumahweb
Recently I use suphp with fcgi on my cPanel Server. When I apply RLimitCPU for each vhost, I see that some scripts that potentially overloading the server is killed. I think this is a good way to control load on server.

But each time a php process killed, apache create a coredump files under users's directory that is large enough to fill user's space limit.

How to disable apache from creating core dump files?

I have try :
- set "ulimit -c 0" on users and root
- set "/proc/sys/fs/suid_dumpable" to 0
- set /etc/security/limits.conf with 0 limit for core parameter
- set CoreDumpDirectory to specific directory

Nothing works to stop apache / PHP from generating coredump files

My goal is to limit resource per vhost but I dont want core dump files to be created. Or at least I can make all core dump files on specfic folder rather than having them all over user's directory.

It can really eat up user's space very quickly especialy for user who have a "high load" type script.

Re: How to disable Apache / PHP from generating coredump?

Posted: 2008/07/07 22:37:45
by jamesapnic
Have you put the ulimit in the apache init.d script? Just before apache runs.
That should in theory do it. Alternatively you could try set -w kernel.core_pattern=/dev/null maybe

[quote]
rumahweb wrote:
Recently I use suphp with fcgi on my cPanel Server. When I apply RLimitCPU for each vhost, I see that some scripts that potentially overloading the server is killed. I think this is a good way to control load on server.

But each time a php process killed, apache create a coredump files under users's directory that is large enough to fill user's space limit.

How to disable apache from creating core dump files?

I have try :
- set "ulimit -c 0" on users and root.[/quote]