I am running php5 FPM with APC as a cache of operations and applications. As usual, I am logging php errors in a file.
Since this is getting pretty big, I tried setting up logrotate. It works, but after rotation, php continues to register in an existing log file, even if it is renamed. This causes scripts.log to be a 0B file and scripts.log.1 continues to grow.
I think (have not tried) that reloading php5-fpm in postrotate might solve this problem, but it will clear my APC cache every time.
Does anyone know how to do this correctly?
linux php logrotate
Steven de groote
source share