Background
Both supervisor and pm2 write logs to /var/traveloka/logs/
there is a possible race condition when app still write to file and supervisor rename the log from service.log
to service.log.1
App doesn't care about it and keep writing to service.log.1
. Reference
Fix
This should be fixed after adding copytruncate
to logrotate. If this happened to your service, it should be fixed after next deployment from commit 70dad8a16fcecece3fd1fa167c4547fd805b557b