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

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"?

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?

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:

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.

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.

Click to expand...

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.

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.

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.

But why you told above. I mean the logfile ever belong the user, is'nt it like that?

till said:

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.