This method restarts PHP on all servers or on specified servers in the cluster. A 202 response in this case does not always indicate a successful restart of all servers. Use the clusterGetServerStatus command to check the server(s) status again after a few seconds.
Version: 1.0
Required Permissions: Full
HTTP method: POST
Supported by Editions: All
Request Parameters:
Parameter |
Type |
Required |
Description |
servers |
Array |
No |
A list of server IDs to restart. If not specified, all servers in the cluster will be restarted. In a single Zend Server context this parameter is ignored. |
force |
Boolean |
No |
Force a full restart of all server’s components. The default value is "FALSE". |
parallelRestart |
Boolean |
No |
This parameter was removed in version 1.3 and has no effect on ZS6, even if used in 1.2 context |
Expected Response Code: 202 Accepted. For more information see Response Format.
Response Type: serversList with the status of all servers to which the restart command was requested (i.e. the servers provided in the servers parameter or all servers if no servers are specified).
Possible Action Specific Error Codes:
HTTP Code |
Error Code |
Description |
404 |
noSuchServer |
One or more of the provided server IDs does not exist. In this case, no servers are restarted. |
500 |
restartFailed |
Restarting at least some of the servers failed. This response is only possible when working with a cluster. |
|
Request (headers removed for clarity)
Response
|
Important Note:
For Zend Server on Mac or Linux, this action is also available via the command line using CLI Tools. For more information see CLI Tools.