Skip to content

Commit d79b82d

Browse files
Alexander Polyakovkrakjoe
Alexander Polyakov
authored andcommitted
opcache: print restart reason
1 parent 929819a commit d79b82d

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
@@ -2941,11 +2941,18 @@ void accel_shutdown(void)
29412941

29422942
void zend_accel_schedule_restart(zend_accel_restart_reason reason)
29432943
{
2944+
const char *zend_accel_restart_reason_text[ACCEL_RESTART_USER + 1] = {
2945+
"out of memory",
2946+
"hash overflow",
2947+
"user",
2948+
};
2949+
29442950
if (ZCSG(restart_pending)) {
29452951
/* don't schedule twice */
29462952
return;
29472953
}
2948-
zend_accel_error(ACCEL_LOG_DEBUG, "Restart Scheduled!");
2954+
zend_accel_error(ACCEL_LOG_DEBUG, "Restart Scheduled! Reason: %s",
2955+
zend_accel_restart_reason_text[reason]);
29492956

29502957
HANDLE_BLOCK_INTERRUPTIONS();
29512958
SHM_UNPROTECT();

0 commit comments

Comments
 (0)