Site log management

Discussion in 'Installation/Configuration' started by SamTzu, Feb 8, 2016.

  1. SamTzu

    SamTzu Active Member

    Had a problem in the weekend. One site managed to generate 16Gb of errors :(
    I have touched on this subject before but there did not seem to be any easy solutions.
    Has any1 came up with a solution that would limit error reporting per site or per error message?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The problem can only occur when the log grows to 16gb within less than 24 hours as the defaut log rotation runs once a day. The only solution that I can think of is to write a log rotate script that runs more often, e.g. once per hour.
     
  3. SamTzu

    SamTzu Active Member

    I think better question is... How to prevent repetitive log messages?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    I don't think that PHP can log a message only once when it gets created once per pageview. So if you have x thousand pageviews then you will always have x thousand messages from php in my opinion.
     
  5. SamTzu

    SamTzu Active Member

    If memory serves... Syslog can ignore repetitive messages.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The logs get written by apache (piped trough vlogger to create per vhost logs) so syslog is not involved here. It might be possible to put syslog somewhere in that log chain but I haven't tried that yet.
     

Share This Page