com php-src: Make killing a locker an ERROR event: ext/opcache/ZendAccelerator.c
| From: | Xinchen Hui | Date: | Tue, 03 Mar 2015 15:16:45 +0000 |
| Subject: | com php-src: Make killing a locker an ERROR event: ext/opcache/ZendAccelerator.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-85176@lists.php.net to get a copy of this message | ||
Commit: 837eeefee9e01156b364a4b0e9cff8d9f0a1a1d5
Author: nathan r. hruby <nhruby@gmail.com> Tue, 3 Mar 2015 23:16:45 +0800
Committer: Xinchen Hui <laruence@php.net> Tue, 3 Mar 2015 23:16:45 +0800
Parents: 304fb7a3d6adbf08fee7e27f4da4e2bd0ef09c48
Branches: PHP-5.5 PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=837eeefee9e01156b364a4b0e9cff8d9f0a1a1d5
Log:
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.
Changed paths:
M ext/opcache/ZendAccelerator.c
Diff:
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index d0765b9..547814c 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 */
}