View Apache log, found to be mod_fcgid module exception, prompt "Connection reset by Peer:mod_fcgid:error reading data from FastCGI server", "premature End of script headers:index.php "," process/usr/... apache/cgi-bin exit (communication error, get unexpected signal 7 ", plainly PHP is the early termination of execution, no return header to exit.
I search on the internet based on these errors for a long time, has not found a satisfactory answer, and even been misled, thinking that the Mod_fcgid module configuration problem.
Before I found a workaround, I kept thinking that PHP was a bit slow recently, but at least it was running, stating that the configuration was OK, and that if you were to execute phpinfo (), the program would still be able to execute. Once again, I combed through the rules of error and found that the MVC framework with multiple include hints at 500 internal errors. Other simple programs can be run. What does that mean?! This means that PHP is no longer able to include files, why? Temporary files can only be moved when these resources are requested, and temporary files do not have extra space.
Run
I found it.
FileSystem Size Used avail use% mounted on
/dev/sda1 6.8G 6.5G 17M 100% /
...
The system master Directory/Bottom has been blown off.
So, look for large files
found that PHP plug-in Xdebug produced a lot of performance analysis files, and are in the 100M record.
/tmp/profiler/cachegrind.out.1336
/tmp/profiler/cachegrind.out.1329 ...
..
It then modifies the php.ini, stores the analysis file elsewhere, or simply does not save it.
# Close Xdebug Profiler on php.ini
xdebug.profiler_enable = Off
Then delete the Xdebug performance analysis directory and the PHP var tracking directory
Rm-rf/tmp/profilter
Rm-rf/tmp/trace
Check the hard drive again and find that it has been used for 26%, remaining 4.9G.
FileSystem Size Used avail use% mounted on
/dev/sda1 6.8G 1.7G 4.9M 26% /
...
Not even restart the httpd server, refresh the Web, and run normally!!!
To avoid complications, we need to install a regular cleaning software--tmpwatch, set the/etc/cron.daily/tmpwatch configuration inside the time
Usr/sbin/tmpwatch "$flags" 30d/var/tmp
Change to 7d (must be in days)
Usr/sbin/tmpwatch "$flags" 7d/var/tmp
One week regular cleaning.