1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Extremely large error_log file?

Discussion in 'Plesk 9.x for Linux Issues, Fixes, How-To' started by clinton4, Jul 28, 2009.

  1. clinton4

    clinton4 Regular Pleskian

    27
     
    Joined:
    Oct 23, 2008
    Messages:
    101
    Likes Received:
    0
    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.
     
  2. Highland

    Highland Guest

    0
     
    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.
     
  3. clinton4

    clinton4 Regular Pleskian

    27
     
    Joined:
    Oct 23, 2008
    Messages:
    101
    Likes Received:
    0
    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?
     
  4. Highland

    Highland Guest

    0
     
    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
     
  5. 64bithost.com

    64bithost.com Regular Pleskian

    25
    57%
    Joined:
    Jul 30, 2007
    Messages:
    182
    Likes Received:
    0
    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
     
Loading...