Skip to content

Commit 837eeef

Browse files
nathanhrubylaruence
authored andcommitted
Make killing a locker an ERROR event
At least in apache, killing a locker with SIGKILL from inside opcache prevents the child process from emitting a corresponding log event to the access or error logs, therefore requests are termed with no record. This makes is incredibly difficult to debug problems espically on systems with high counts of cache restarts. Since INFO level is far too noisy for production use, switch the killing to a higher level so we can see it easier.
1 parent 304fb7a commit 837eeef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ static inline void kill_all_lockers(struct flock *mem_usage_check)
573573
ZCSG(force_restart_time) = 0;
574574
while (mem_usage_check->l_pid > 0) {
575575
while (tries--) {
576-
zend_accel_error(ACCEL_LOG_INFO, "Killed locker %d", mem_usage_check->l_pid);
576+
zend_accel_error(ACCEL_LOG_ERROR, "Killed locker %d", mem_usage_check->l_pid);
577577
if (kill(mem_usage_check->l_pid, SIGKILL)) {
578578
break;
579579
}
@@ -586,7 +586,7 @@ static inline void kill_all_lockers(struct flock *mem_usage_check)
586586
usleep(10000);
587587
}
588588
if (!tries) {
589-
zend_accel_error(ACCEL_LOG_INFO, "Can't kill %d after 20 tries!", mem_usage_check->l_pid);
589+
zend_accel_error(ACCEL_LOG_ERROR, "Can't kill %d after 20 tries!", mem_usage_check->l_pid);
590590
ZCSG(force_restart_time) = time(NULL); /* restore forced restart request */
591591
}
592592

0 commit comments

Comments
 (0)