one User domain error log filling the server and causing it to crash

nservices

Verified User
Joined
Dec 11, 2008
Messages
300
Hi,
sometime, domain errorlog is filling to 30-40GB and even more and full the Disk space of the server and server is crashing
it's possible to limit the log files (access & errors) from DirectAdmin gui with some default of 100-200MB per user so it's will not happen
I do not think it's right to define separately for each server from ssh manually in logrotate...

Regards,
StarNetwork
 
I think I would first ask that user to fix his website or suggest what to fix, or else you would have to charge him extra for the trouble he's causing.

Besides that I believe you can also limit what errors(level) are written in the logfiles.
 
I think I would first ask that user to fix his website or suggest what to fix, or else you would have to charge him extra for the trouble he's causing.

Besides that I believe you can also limit what errors(level) are written in the logfiles.

Hi, your right in both, but:
1. in real time, you can't Count on it to catch it in time before server is full
2. I know, but still we want to show to users the relevant errors, and also sometime it's even in "high level" of errors

Regards,
 
You should put the logs on a different partition to keep your server running if the logs fill the disk.
 
You should put the logs on a different partition to keep your server running if the logs fill the disk.

it's can be solution, but am looking for out of the box solution in the panel gui level, some size limit
 
Directadmin has a Depreciated value for apache log size before rotation (log_rotate_size)... Apache logs are rotated each tally, so you might want to run it more often than once per day. In this case you might need to adjust logs_to_keep in directadmin.conf to have needed rotated logs.

Another solution would be to disable log rotation in directadmin with

Code:
rotation=0

and use logrotate for it.
 
Currently directadmin does not have such an opportunity. As another solution would be to write a script to monitor logs size and trigger a user tally process:

Code:
echo "action=tally&value=username&type=user" >> data/task.queue

username should be changed with a real username here. Probably monit can be used here to monitor logs' size.
 
Back
Top