Many core.xxxx file generated in the root directory

cPanel Server Management for just $59/mo with Unlimited tickets, Unlimited admin hours, Security audits, 24×7 monitoring and lot more 

cPanel Server Management  $59/mo Click here

You might find many code.xxxx file generated under the document root of your directory

-rw------- 1 user user 5210112 May 30 15:57 core.22388
-rw------- 1 user user 5210112 Apr 28 16:28 core.22396
-rw------- 1 user user 5210112 Mar 30 17:40 core.22437
-rw------- 1 user user 5210112 Jun 19 11:04 core.23621
-rw------- 1 user user 5210112 Jun 17 10:25 core.23839
-rw------- 1 user user 5210112 Apr 28 16:28 core.22396
-rw------- 1 user user 5210112 Mar 30 17:40 core.22437
-rw------- 1 user user 5210112 Jun 19 11:04 core.23621
-rw------- 1 user user 5210112 Jun 17 10:25 core.23839
-rw------- 1 user user 5210112 Apr 28 16:28 core.22396

The possible reason for the core files getting generated is when a php process is killed, apache creates core files under your account .

You can find the reason by running the following command

gdb -c core.XXXX

You can see an output like this

gdb -c core.23943
GNU gdb (GDB) CentOS (7.0.1-45.el5.centos)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
[New Thread 23943]
Core was generated by `/usr/bin/php /home/username/public_html/sucuri-bcbfd87739172d88f746bb7b5df18ec5.ph'.
Program terminated with signal 25, File size limit exceeded.

You can see which is the script caused the issue and what is the reason

It can happen due to incorrect php.ini file On phpSuexec servers. If the reason is php or apache then you can fix it by  editing the httpd start up file on the server end .

[email protected] [~]# vi /etc/init.d/httpd

Search for ulimit lines .For eg : you can see these lines

ulimit -n 1024
ulimit -n 4096
ulimit -n 8192
ulimit -n 16384

You need to add ulimit -c 0 at the end .Which will look like :

ulimit -n 1024
ulimit -n 4096
ulimit -n 8192
ulimit -n 16384
ulimit -c 0

Monthly server support with Unlimited tickets, 24×7 monitoring, Security Audit and lot more for just $59

Server Management at just $59

Leave a Reply

Your email address will not be published. Required fields are marked *