Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Issue

The Zend Server reset stops and restarts both the Zend Server subsystem and the ZENDSVR6 Apache instance, as well as cleans up some IPC objects and other things. 
This is a good procedure to perform if any Zend Server components are producing unexpected results.

Environment

Zend Server for IBM i version 6 or higher, running on any supported version of IBM i.

Resolution

Log into a 5250 session as QSECOFR.  (The user MUST be QSECOFR to get UID zero, no other user has this UID, even a *SECOFR class user will not have it).  From the command line:

For version 9:

Info
iconfalse
go zendphp7/zsmaint

Use option "41. Reset Zend Server environment". 

For version 8.5:

Info
iconfalse
go zendsvr6/zsmaint

Use option "41. Reset Zend Server environment". 

For version 6, 7, or 8

Info
iconfalse
go zendsvr6/zsmenu

Use option "9. Reset Zend Server environment". 


Wait for all of these messages to display:

Info
iconfalse
Stopping Zend Server jobs

Clearing shared memory ...

Zend Server environment is reset
All Zend Server jobs are restarted

Use F3 to exit.  After the reset, check to see that all Zend Server jobs have restarted.  This article can help you with that:

Verify Zend Server for IBM i has started successfully



Tip
titleReset Zend Server environment Use a CL Program

Stop the Zend Server Environment before running this procedure. 

For Zend Server with PHP 5.X.X:
ENDSBS ZENDSVR6/ZENDSVR6
ENDTCPSVR SERVER(*HTTP) HTTPSVR(ZENDSVR6)
MONMSG MSGID(CPF0000)

For Zend Server with PHP 7
ENDSBS ZENDSVR6/ZENDPHP7
ENDTCPSVR SERVER(*HTTP) HTTPSVR(ZENDPHP7)
MONMSG MSGID(CPF0000)


Reset Zend Server environment:
PGM

DCL VAR(&CMDSHR) TYPE(*CHAR) LEN(50)
DCL VAR(&NULL) TYPE(*CHAR) LEN(1) VALUE(X'00')
DCL VAR(&HOMEDIR) TYPE(*CHAR) LEN(50) +
VALUE('/usr/local/zendsvr6')
/* VALUE('/usr/local/zendphp7') */

/* Part 1 - clean up zombie Apache jobs */
CHGVAR VAR(&CMDSHR) VALUE('ps -ef | grep ' *CAT +
'php-cgi' *CAT ' | awk "{print $2}" | +
xargs kill -9' || &NULL)

CALL PGM(QP2SHELL) PARM('/QOpenSys/usr/bin/sh' +
&CMDSHR)
MONMSG MSGID(CPF0000)
/* Part 2 - Clearing shared memory */

/*parameters : script, tofile, look for string, status */
CHGVAR VAR(&CMDSHR) VALUE(&HOMEDIR *TCAT +
'/bin/i5ipcrm_script.sh' || &NULL)
CALL PGM(QP2SHELL) PARM('/QOpenSys/usr/bin/sh' +
&CMDSHR)
MONMSG MSGID(CPF0000)

CHGVAR VAR(&CMDSHR) VALUE(&HOMEDIR *TCAT +
'/bin/clean_tmpfiles.sh' || &NULL)

CALL PGM(QP2SHELL) PARM('/QOpenSys/usr/bin/sh' +
&CMDSHR)
MONMSG MSGID(CPF0000)

ENDPGM