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
Last revision Both sides next revision
litespeed_wiki:php:concurrency [2018/09/19 18:43]
Michael Alegre [PHP Non-suEXEC Max Connections]
litespeed_wiki:php:concurrency [2019/03/29 19:27]
Lisa Clarke Proofreading
Line 10: Line 10:
  
 This wiki will go over the ways to control concurrency with different PHP LSAPI setups. This wiki will go over the ways to control concurrency with different PHP LSAPI setups.
-====== PHP suEXEC Max Connections ​======+===== PHP suEXEC Max Connections =====
  
 LSWS offers three different PHP suEXEC modes: [[https://​www.litespeedtech.com/​docs/​litespeed-sapi/​php-lsapi/​suexec-worker|Worker]],​ [[https://​www.litespeedtech.com/​docs/​litespeed-sapi/​php-lsapi/​suexec-daemon-mode|Daemon]],​ and [[https://​www.litespeedtech.com/​docs/​litespeed-sapi/​php-lsapi/​suexec-processgroup|ProcessGroup]]. LSWS offers three different PHP suEXEC modes: [[https://​www.litespeedtech.com/​docs/​litespeed-sapi/​php-lsapi/​suexec-worker|Worker]],​ [[https://​www.litespeedtech.com/​docs/​litespeed-sapi/​php-lsapi/​suexec-daemon-mode|Daemon]],​ and [[https://​www.litespeedtech.com/​docs/​litespeed-sapi/​php-lsapi/​suexec-processgroup|ProcessGroup]].
Line 27: Line 27:
     LSPHP_Workers 100     LSPHP_Workers 100
   </​IfModule>​   </​IfModule>​
-====== PHP Non-suEXEC Max Connections ​======+===== PHP Non-suEXEC Max Connections =====
  
 LSWS offers two non-suEXEC PHP modes: Worker and ProcessGroup. LSWS offers two non-suEXEC PHP modes: Worker and ProcessGroup.
Line 38: Line 38:
   - ProcessGroup:​ In ProcessGroup,​ the Instances setting must be set to 1. Control the number of processes instead with the [[https://​www.litespeedtech.com/​docs/​litespeed-sapi/​php-lsapi/​configuration|PHP_LSAPI_CHILDREN environment variable]].   - ProcessGroup:​ In ProcessGroup,​ the Instances setting must be set to 1. Control the number of processes instead with the [[https://​www.litespeedtech.com/​docs/​litespeed-sapi/​php-lsapi/​configuration|PHP_LSAPI_CHILDREN environment variable]].
  
-=====Which setup am I using? ======+===== Determining ​Which PHP Setup is in Use =====
  
 Some users may be confused about which setup they are using. Follow the steps in the [[litespeed_wiki:​php:​which_php_setup_am_I_using|Which PHP setup am I using? wiki]] to figure it out. Some users may be confused about which setup they are using. Follow the steps in the [[litespeed_wiki:​php:​which_php_setup_am_I_using|Which PHP setup am I using? wiki]] to figure it out.
  
  
-====== Reached ​max children process limit? ​======+===== Reached ​Max Children Process Limit ======
  
 You might have already fine-tuned the environment variables such as LSAPI_CHILDREN to 50 but still experienced error message like “Reached max children process limit: 15, extra: 5, current: 20, please increase LSAPI_CHILDREN”. <​env>​LSAPI_CHILDREN=50</​env>​ has been double-checked in lsphp5 external app and seems no problem. Why doesn'​t match? What happened? How to fix it? You might have already fine-tuned the environment variables such as LSAPI_CHILDREN to 50 but still experienced error message like “Reached max children process limit: 15, extra: 5, current: 20, please increase LSAPI_CHILDREN”. <​env>​LSAPI_CHILDREN=50</​env>​ has been double-checked in lsphp5 external app and seems no problem. Why doesn'​t match? What happened? How to fix it?
Line 60: Line 60:
  
 On the other hand, you should verify if it is normal to have so many PHP processes. You may try to enable cache to avoid such high PHP processes. On the other hand, you should verify if it is normal to have so many PHP processes. You may try to enable cache to avoid such high PHP processes.
- + 
 +===== New PHP suEXEC Max Conn Being Ignored ===== 
 + 
 +After you change **PHP suEXEC Max Conn**, for example, from ''​10''​ to ''​20'',​ error messages sometime show as mixed old value ''​10''​ and new setting ''​20''​. Why? 
 +  (14715) Reached max children process limit: 10, extra: 3, current: 13, busy: 12, please increase LSAPI_CHILDREN. 
 +  (28253) Reached max children process limit: 20, extra: 6, current: 26, busy: 26, please increase LSAPI_CHILDREN. 
 +  (14715) Reached max children process limit: 10, extra: 3, current: 13, busy: 12, please increase LSAPI_CHILDREN. 
 +  (28253) Reached max children process limit: 20, extra: 6, current: 26, busy: 26, please increase LSAPI_CHILDREN. 
 +  (14715) Reached max children process limit: 10, extra: 3, current: 13, busy: 12, please increase LSAPI_CHILDREN. 
 +  (28253) Reached max children process limit: 20, extra: 6, current: 26, busy: 26, please increase LSAPI_CHILDREN. 
 +  (28253) Reached max children process limit: 20, extra: 6, current: 26, busy: 26, please increase LSAPI_CHILDREN. 
 +  (14715) Reached max children process limit: 10, extra: 3, current: 13, busy: 12, please increase LSAPI_CHILDREN. 
 +  (28253) Reached max children process limit: 20, extra: 6, current: 26, busy: 26, please increase LSAPI_CHILDREN. 
 +  (28253) Reached max children process limit: 20, extra: 6, current: 26, busy: 26, please increase LSAPI_CHILDREN. 
 + 
 +To make the change effective immediately,​ you will need to restart LiteSpeed Web Server. If LSWS 5.3+ is used, you will also need to restart detached PHPs 
 + 
 +  service lsws restart 
 +  killall lsphp 
 +  
  • Admin
  • Last modified: 2022/10/25 20:03
  • by Lisa Clarke