I am working on a website in Ruby on Rails and have enabled log rotation on the server with the reference of blog article.
I have written the following code in my /etc/logrotate.conf file.
/path/to/your/rails/applicaton/log/*.log {
daily
missingok
rotate 7
compress
delaycompress
notifempty
copytruncate
}
But I still happen to get this error once in 2 weeks:
Errno::ENOSPC: No space left on device - <STDERR>
In this case I have to remove the log files manually which is a cause of worry. I have rechecked my settings.
Please suggest why this issue comes even after rotating log daily or how I can I rotate my logs more frequently or any better way to escape this error.
Many Thanks!!