Skip to content

Commit a4accc0

Browse files
Alexander Polyakovkrakjoe
Alexander Polyakov
authored andcommitted
opcache: print restart reason
1 parent aaaef22 commit a4accc0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2921,11 +2921,18 @@ void accel_shutdown(void)
29212921

29222922
void zend_accel_schedule_restart(zend_accel_restart_reason reason)
29232923
{
2924+
const char *zend_accel_restart_reason_text[ACCEL_RESTART_USER + 1] = {
2925+
"out of memory",
2926+
"hash overflow",
2927+
"user",
2928+
};
2929+
29242930
if (ZCSG(restart_pending)) {
29252931
/* don't schedule twice */
29262932
return;
29272933
}
2928-
zend_accel_error(ACCEL_LOG_DEBUG, "Restart Scheduled!");
2934+
zend_accel_error(ACCEL_LOG_DEBUG, "Restart Scheduled! Reason: %s",
2935+
zend_accel_restart_reason_text[reason]);
29292936

29302937
SHM_UNPROTECT();
29312938
ZCSG(restart_pending) = 1;

0 commit comments

Comments
 (0)