My PHP scripts generate log files and I am trying to use logrotate to manage them.

File `/etc/logrotate.d/php-logs`:

```
/srv/cache/*.log {
  daily
  notifempty
  size 800K
  rotate 5
  missingok
  compress
  delaycompress
}

```

This is working, except for the part that sometimes the log rotation process coincides with PHP trying to append the log.

What is the best way to solve this?