I want to disable core dump generation, How can I disable it ? One of the website keeps generating core dumps every second and eats up all the disk space.

OS Details: 
cPanel Server 
cloudlinux server

core dump files are generated in public_html folder. I have followed the steps mentioned as in the http://www.cyberciti.biz/faq/linux-disable-core-dumps/ (does not seem to be working)

  • You don't want to disable the core dumps. You want to look for the cause of the core dumping and prevent the problem from occurring. It seems likely that you have php misconfigured, conflicting modules, or something along those lines.
    – umeboshi
    Commented Feb 4, 2015 at 16:28
  • > You don't want to disable the core dumps. Yes you do. When core dumps drop massive 20GB files on the disk and take up all the space as well as file the FS with noise in the current dir, possibly even causing a data leak (although rare), you want the damned thing turned off. Especially when loads of NIX file systems GET CORRUPT or b0rked when space fills up! IE, XFS, BTRFS, etc. It's all fun and games until your processes use some sizable amount of RAM, IE, processing big data sets. Nodejs is very nasty for example because it segfaults when out of RAM.
    – jgmjgm
    Commented Jan 9, 2020 at 11:11
  • Dumping all the RAM to disk isn't clever, it's like hibernating, used huge amount of space and IO.
    – jgmjgm
    Commented Jan 9, 2020 at 11:16

2 Answers 2


You need to execute ulimit -c 0 in the script that starts the webserver, probably /etc/init.d/apache or /etc/init.d/httpd. Place it near the top, but don't make it the first line.

Alternatively you can change the way the core dump is written, so that subsequent core dumps overwrite the previous instead of creating a new file. Add these lines to /etc/sysctl.conf:

kernel.core_uses_pid = 0
kernel.core_pattern = core

and run sysctl -p. Now the core dumps will be named simply core.

You could now also create a zero-sized file owned by root with no write permissions; as the core dump is written with the privileges of the process owner, it won't be able to overwrite that file, hence no core dump.


Check if your CentOS has Automatic Bug Reporting Tool (ABRT) installed and running. See https://fedorahosted.org/abrt/wiki/AbrtDeployment2 for more info.

In short if abrtd deamon is running then it is what handles creation of core dump files. In this case, you need to configure abrtd deamon via /etc/abrt/abrt.conf.

You may use "BlackList" directive to exclude the binaries.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .