opcache: print restart reason

This commit is contained in:
Alexander Polyakov 2017-01-13 14:55:10 +03:00 committed by Joe Watkins
parent aaaef22db6
commit a4accc0e3e
No known key found for this signature in database
GPG Key ID: F9BA0ADA31CBD89E

View File

@ -2921,11 +2921,18 @@ void accel_shutdown(void)
void zend_accel_schedule_restart(zend_accel_restart_reason reason)
{
const char *zend_accel_restart_reason_text[ACCEL_RESTART_USER + 1] = {
"out of memory",
"hash overflow",
"user",
};
if (ZCSG(restart_pending)) {
/* don't schedule twice */
return;
}
zend_accel_error(ACCEL_LOG_DEBUG, "Restart Scheduled!");
zend_accel_error(ACCEL_LOG_DEBUG, "Restart Scheduled! Reason: %s",
zend_accel_restart_reason_text[reason]);
SHM_UNPROTECT();
ZCSG(restart_pending) = 1;