Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
litespeed_wiki:php_lsapi:environment_variables [2013/09/24 19:50]
Michael
litespeed_wiki:php_lsapi:environment_variables [2013/12/02 21:08]
Michael removed
Line 8: Line 8:
  
 There are two ways to let PHP handle multiple requests concurrently,​ server managed mode and self managed mode. In server managed mode, LiteSpeed Web Server dynamically spawns/​stops PHP processes. In this mode, an external application'​s "​Instances"​ setting should match the "Max Connections"​ configuration. To start PHP in self managed mode, "​Instances"​ should be set to "​1",​ while the "​LSAPI_CHILDREN"​ environment variable should be >1 and set to match the value of "Max Connections"​. In this mode the web server will start one PHP process, and this process will start/stop child PHP processes dynamically based on on demand. Self managed mode is preferred because all PHP processes can then share one memory block for opcode caching. ​ There are two ways to let PHP handle multiple requests concurrently,​ server managed mode and self managed mode. In server managed mode, LiteSpeed Web Server dynamically spawns/​stops PHP processes. In this mode, an external application'​s "​Instances"​ setting should match the "Max Connections"​ configuration. To start PHP in self managed mode, "​Instances"​ should be set to "​1",​ while the "​LSAPI_CHILDREN"​ environment variable should be >1 and set to match the value of "Max Connections"​. In this mode the web server will start one PHP process, and this process will start/stop child PHP processes dynamically based on on demand. Self managed mode is preferred because all PHP processes can then share one memory block for opcode caching. ​
-If "​LSAPI_CHILDREN"​ <=1, PHP will be started in server managed mode.+If "​LSAPI_CHILDREN" ​%%<=%%1, PHP will be started in server managed mode.
 Usually, there is no need to set the value of "​LSAPI_CHILDREN"​ over "​100"​. Usually, there is no need to set the value of "​LSAPI_CHILDREN"​ over "​100"​.
  
Line 68: Line 68:
  
 If set to a non-zero number, LiteSpeed Web Server will log requests into an error log file if a request takes longer than the specified number of milliseconds. This can help identify scripts that are slowing down your server. If set to a non-zero number, LiteSpeed Web Server will log requests into an error log file if a request takes longer than the specified number of milliseconds. This can help identify scripts that are slowing down your server.
 +
 +==== LSAPI_DUMP_DEBUG_INFO ====
 +
 +In self-managed mode, if set to a non-zero number, debug information of a run-away child process will be written into stderr.log. Debug information are stack trace and open files of the run-away child process. If a process spent more than LSAPI_MAX_PROCESS_TIME on processing a request, it will be treated as a Run-away process. It is usually caused by dead-loop or bad SQL statement in PHP code. 
 +
  • Admin
  • Last modified: 2013/09/24 19:53
  • by Michael