How to disable Apache / PHP from generating coredump?

Support for webhosts that use CentOS
Post Reply
rumahweb
Posts: 1
Joined: 2008/06/30 04:35:37
Contact:

How to disable Apache / PHP from generating coredump?

Post by rumahweb » 2008/06/30 04:41:01

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.

jamesapnic
Posts: 9
Joined: 2008/07/06 17:49:44
Contact:

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

Post by jamesapnic » 2008/07/07 22:37:45

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]

Post Reply

Return to “CentOS 5 - Webhosting Support”