• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Extremely large error_log file?

clinton4

Regular Pleskian
Hi,

On one of my domains, the error_log file sometimes grows to over 239326720 kilobytes (228 GB) in one night. Why is this and how can i prevent this?

The file is so big that i also get the "Disk space usage has reached the threshold on / mount point on domain.net" error.
 
Have you tried using something like tail (#tail error_log) to see what the last 10 or so lines were? I've seen error_log grow large when there's an error or warning inside a PHP loop on a well trafficked page. I've never had one get THAT big overnight, tho.
 
I got thousand of lines like this:

[Tue Jul 28 06:02:32 2009] [error] [client 174.133.177.66] PHP Warning: feof(): supplied argument is not a valid stream resource in /var/www/vhosts/domain.net/httpdocs/nyheter/index.php on line 79
[Tue Jul 28 06:02:32 2009] [error] [client 174.133.177.66] PHP Warning: fread(): supplied argument is not a valid stream resource in /var/www/vhosts/domain.net/httpdocs/nyheter/index.php on line 80

I'am guessing i was hit by a spam boot and that index.php is producing a error.

Does anybody know if it's posible to automatically delete the error_log file if it reaches a maximum file size that i have set?
 
If I were you, I'd clean up the code that's producing that error. Those errors are the result of sloppy coding.

Less desirable would be to change the logging warning level
 
use WsFTP on port 22 go into your /domain.com/ and download the .errorlog under error logs. be sure that you recreate an error log with the same name that has a byte ratio of 0kb by uploading .errorlog.txt and then renaming it .errorlog.

- Chris
 
Back
Top