Apache log-rotate feature is not working

is very big you might need to do something manually.
This is the reason why I want to put it on max 1GB using 'rotate_httpd_error_log_meg=1024'
(before I changed directadmin.conf I deleted the 14GB file manually and restarted httpd)
 
Ok it was already set to rotate at a gig and it didnt rotate?

OR

You want it to rotate at a gig now because you didn't have it set before the 14 g log file?

If you have it set now it should rotate at a gig.
 
Ok it was already set to rotate at a gig and it didnt rotate?
It was already the second time, I change directadmin.conf after the first time. But some days later the problem was there again and he didn't rotate.
 
Humm might be a bug then. Assuming the os and da is all updated?
 
This is what I found in /var/log/directadmin/errortaskq.log

2022:01:11-16:03:02: removing old lock: ./data/admin/error_log_truncate.lock.lock (age: 3601 seconds) this caller='Apache::check_for_rotate_error_logs', old creation info: lock created Tue Jan 11 15:03:01 2022
2022:01:11-16:03:02: An error occurred while sending the mail
2022:01:11-16:03:02: An error occurred while sending the mail
2022:01:11-16:03:02: Apache::check_for_rotate_error_logs: couldn't open truncate log /var/log/httpd/domains/xxxxxxx.xxx.error.log.trunc for writing: No space left on device
2022:01:11-16:04:34: An error occurred while sending the mail
2022:01:11-16:04:34: An error occurred while sending the mail
2022:01:11-16:04:34: Apache::check_for_rotate_error_logs: couldn't open truncate log /var/log/httpd/domains/xxxxxxx.xxx.error.log.trunc for writing: No space left on device
2022:01:11-16:05:02: An error occurred while sending the mail
2022:01:11-16:05:03: An error occurred while sending the mail
2022:01:11-16:05:03: Apache::check_for_rotate_error_logs: couldn't open truncate log /var/log/httpd/domains/xxxxxxx.xxx.error.log.trunc for writing: No space left on device
2022:01:11-16:06:02: An error occurred while sending the mail
2022:01:11-16:06:02: An error occurred while sending the mail
2022:01:11-16:06:02: Apache::check_for_rotate_error_logs: couldn't open truncate log /var/l2022:01:11-16:32:02: service mysqld wasn't running, starting mysqld
 
That is the problem.
It is a drive of 15GB, the log_rotate is set to 1GB, but the file is growing to 14GB.
So there is space enough, but because the log_rotate doesn't work is gets full.
 
I think you only have 2 options, or you resize the partition or you try to fix an issue with an application that writes 14GB of errorlog per day.
I would suggest the latter.
 
Yes, the thing that need to be done is fix the application.
But it is a share hosting system, so we have to ask our customer to look at it. And tomorrow there could be another script that have the problem.
DirectAdmin has a feature for it, so we like to use it, but for now it isn't working like it should work.
 
Back
Top