Server crashed by unlimited error.log size - how to set a limit?

Discussion in 'Installation/Configuration' started by tom, Apr 6, 2008.

  1. tom

    tom Member

    The ISPConfig Server crashed including the two apache servers because there was no more swap space left. The left space a faulty script has filed by growing up the error.log in /var/www/webxy/log/error.log.

    How could be set a limit to the size of all error.log to prevent the next crash caused by "disk full"?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to set a quota limit on for the owner of the error.log file, I guess its apache oor www-data ? This will prevent your server from crashing but not apache when the quota is reached.
     
  3. tom

    tom Member

    The owner of the logfiles are the systemusers. With ISPConfig I've set a quota in ISP Web --> Basis --> Speicher MB to 60MB but if I check it the user has no limit. Why the ISPConfig setting has no effect?
     
  4. falko

    falko Super Moderator Howtoforge Staff

  5. tom

    tom Member

    It's a 32bit system but I suppose in my case it does'nt belong to the thread you put a link because the logline is'nt > 2GB. The quota in ISPConfig does'nt has any effect. And therefore it a the ordenary error.log from a users account ca grow up unlimited. So again:

    Why does the user account limit does'nt have any effect to quota?
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Did you set a logsize limit on the Options tab of that web site?
     
  7. tom

    tom Member

    Yes and No, it was set by default to 30%. What does 30% mean? 30% of the free space on the disk or 30% of the hole disk?
     
    Last edited: Apr 9, 2008
  8. tom

    tom Member

    I'm still unsure why it the logfilesize could grow unlimited and the quota has no effect.
     
  9. falko

    falko Super Moderator Howtoforge Staff

    It's 30% of the web site quota (60MB, so that would make 18MB).

    I suggest you upgrade to ISPConfig 2.2.22, I've rewritten the webalizer.php script, so hopefully it solves your problem.
     
  10. tom

    tom Member

    If've upgradet to the lastet ispconfig version.

    The quota for a webuser does not has an effect because the the logfiles are owned by root. I've chaned ot to the user and now I hope quota will do the other things ...
     
    Last edited: Apr 19, 2008
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    It is fine that the logfiles are owned by root. The quota is applied by a nightly ISPConfig script and not the Linux quota. If you change the ownership to a user with quota, your apache will fail when quota is reached. I recommend that you change back the ownership to root.
     
  12. tom

    tom Member

    If've compared the ownership of the dangerus big error.log form the web user with other users and I find that all error.log files are owned by the web user. After I've recogniced that I changed the ownership of the logfile.

    Now I find an other strange thing - how can that be? The the linited storage space ist smaler than the used space. Should'nt the quota take place before the limit ist reached? That I've noticed on the ISP Site form.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats not really strange if you know how the statistics and quota works. What ISPCOnfig displays as used space is the amount of space used inside the website directory for all users while the website quota is a linux group quota. If you copy now a file e.g. owned by root into the website dierctory, it will be shown as used space but it did bot account to the quota value.
     
  14. tom

    tom Member

    I'm a bit confused now ...

    At the bottom of the Administrator Manual from ISPConfig is noticed:
    Here: ISP Site --> Basis --> Space MB: 50MB (ISPConfig counter?)
    the storage space for all users can be set. Right? This usage of it has no effect to the system quote for the webuser managed here:

    ISP Site --> User & Email --> WebSpace MB: 60MB (usage of system quota)

    Right?
     
  15. tom

    tom Member

    I'm still confused about this things ...
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats all correct and fine. The used space is not from a user of this site as I explained above.

    Example:

    We have the site /var/www/web1/ with the user web1_test. The quota of the site is 10 MB.

    Now we upload a 5 MB file with FTP as user web1_test and the website statistic will show 5 MB used space and the used quota is 5 MB too. Now you login as root user (root is not a member of this site) and copy a file with 100 MB size on the shell into the directory /var/www/web1/.

    The website statistics will show now 105 MB used space for the directory /var/www/web1/, but the quota which is used by the users of the site is still just 5 MB.
     
  17. tom

    tom Member

    Thanks, for your explanation. Now I got it very clear.

    But why you told above. I mean the logfile ever belong the user, is'nt it like that?
     
    Last edited: Apr 22, 2008

Share This Page