The log rotate seems to be working as intended and the file size gets limited to 250MB but somehow there seems to be a bug in file close/open and the log directory keeps filling up until it runs out of space. df -h command shows that the used space is close to 100% but if I look using du -h or ls and add up the file sizes it is not close to 100%. My platform is CentOS7.
Thanks,
Ramkumar
Dave Cheney
unread,
Sep 29, 2016, 3:08:21 AM9/29/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
This is usually caused by the process writing to a log file that has been deleted. This is a very common bug with programs that rotate their own logs and a major reason why 12 factor apps recommend that log rotation be down by an external program.
Have a look in /proc/yourprocess/fd with ls -al. If there is an open file pointing to a log file with the suffix (deleted), that's the problem.
Dave
ramkumar.g...@gmail.com
unread,
Sep 29, 2016, 8:37:47 AM9/29/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
So it looks like a bug in the glog library. Anyway to file a bug against it?
Dave Cheney
unread,
Sep 29, 2016, 8:39:50 AM9/29/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts, ramkumar.g...@gmail.com
Did you find the open deleted file in /proc/.../fds ?
alexg...@gmail.com
unread,
Sep 20, 2017, 9:01:26 PM9/20/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
glog library does not delete log files. It only creates new log files.
Btw, not sure if you actually modified that "line", but note that you only need to modify the variable.