summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornathan r. hruby <nhruby@gmail.com>2015-03-03 23:16:45 +0800
committerXinchen Hui <laruence@php.net>2015-03-03 23:16:45 +0800
commit837eeefee9e01156b364a4b0e9cff8d9f0a1a1d5 (patch)
tree4e415df06bc91dbde8cd11a4b252da3a1137ef17
parent304fb7a3d6adbf08fee7e27f4da4e2bd0ef09c48 (diff)
downloadphp-git-837eeefee9e01156b364a4b0e9cff8d9f0a1a1d5.tar.gz
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.
-rw-r--r--ext/opcache/ZendAccelerator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index d0765b9bcc..547814cd2e 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -573,7 +573,7 @@ static inline void kill_all_lockers(struct flock *mem_usage_check)
ZCSG(force_restart_time) = 0;
while (mem_usage_check->l_pid > 0) {
while (tries--) {
- zend_accel_error(ACCEL_LOG_INFO, "Killed locker %d", mem_usage_check->l_pid);
+ zend_accel_error(ACCEL_LOG_ERROR, "Killed locker %d", mem_usage_check->l_pid);
if (kill(mem_usage_check->l_pid, SIGKILL)) {
break;
}
@@ -586,7 +586,7 @@ static inline void kill_all_lockers(struct flock *mem_usage_check)
usleep(10000);
}
if (!tries) {
- zend_accel_error(ACCEL_LOG_INFO, "Can't kill %d after 20 tries!", mem_usage_check->l_pid);
+ zend_accel_error(ACCEL_LOG_ERROR, "Can't kill %d after 20 tries!", mem_usage_check->l_pid);
ZCSG(force_restart_time) = time(NULL); /* restore forced restart request */
}