Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
litespeed_wiki:cloudlinux:enable_ruby_python_selector [2021/08/20 20:33]
Jackson Zhang [Troubleshooting]
litespeed_wiki:cloudlinux:enable_ruby_python_selector [2021/08/24 11:58]
Lisa Clarke Copyediting
Line 16: Line 16:
   - Switch to LiteSpeed and try a ruby/python app   - Switch to LiteSpeed and try a ruby/python app
 ===== Restart the Python and Ruby Application ===== ===== Restart the Python and Ruby Application =====
-==== Through ''​touch tmp/restart.txt''​ ==== +There are two ways to restart ​the Python and Ruby application: through the cPanel CloudLinux Python Application Manager, or by touching the ''<​app_root_dir>/​tmp/​restart.txt''​ file.
-The Python and Ruby application ​can be restarted ​by touching the ''<​app_root_dir>/​tmp/​restart.txt''​ file. +
-For example, if a python application is located at ''/​home/​user1/​mypythonapp''​ the command would be: +
  
-<​code>​touch ​/​home/​user1/​mypythonapp/​tmp/​restart.txt</​code>​+For example, if a Python application is located at ''​/​home/​user1/​mypythonapp''​ the command would be: 
  
-If /​home/​user1/​mypythonapp/​tmp/​restart.txt ​exits already, you will still need to "​touch"​ it. +<​code>​touch ​/​home/​user1/​mypythonapp/​tmp/​restart.txt</​code>​
  
 This will tell the server to restart the application. This will tell the server to restart the application.
  
-==== Through CloudLinux Python application manager ==== +**NOTE**: ​If you are restarting the Python ​app by touching ''<​app_root_dir>/​tmp/​restart.txt'',​ and the file already exists, you must still ''​touch''​ it to restart the app
-If you run cpanel and CloudLinux ​Python ​application manager, you can restart the Python application there.+
  
 ===== Troubleshooting ===== ===== Troubleshooting =====
Line 57: Line 54:
 This indicates Django was not properly set up for the application. ​ This indicates Django was not properly set up for the application. ​
  
-==== ''​touch tmp/​restart.txt''​ or CL Python manager restart ​can not restart ​Python application ​====+==== The application will not restart ==== 
 + 
 +If ''​touch ​<​app_root_dir>/​tmp/​restart.txt''​ or the CloudLinux ​Python manager ​fail to restart ​the Python application, there may be some old lswsgi processes in the way. Use the ''​ps''​ command to verify:
  
-''​touch tmp/​restart.txt''​ or CL Python manager restart can not restart Python application. Most likely there are some old lswsgi processes. 
 <​code>​ <​code>​
 ps -ef | grep pythontest ps -ef | grep pythontest
 +</​code>​
 +<​code>​
 pythont+ 508045 1 0 Aug13 ? 00:01:23 /​opt/​alt/​python37/​bin/​lswsgi -m /​home/​pythontest/​pyapp1/​passenger_wsgi.py pythont+ 508045 1 0 Aug13 ? 00:01:23 /​opt/​alt/​python37/​bin/​lswsgi -m /​home/​pythontest/​pyapp1/​passenger_wsgi.py
 pythont+ 890556 1 0 Jul31 ? 00:05:34 /​opt/​alt/​python37/​bin/​lswsgi -m /​home/​pythontest/​pyapp1/​passenger_wsgi.py pythont+ 890556 1 0 Jul31 ? 00:05:34 /​opt/​alt/​python37/​bin/​lswsgi -m /​home/​pythontest/​pyapp1/​passenger_wsgi.py
Line 70: Line 70:
 </​code>​ </​code>​
  
-Although ''​touch tmp/​restart.txt''​ or CL Python manager restart ​may restart ​the latest lswsgi process, ​but some old processes ​may be still running and cause restart issues. ​ These processes ​may still be there even you switch to apache ssh login to the user and manually ​killing these processes ​should fix the issue+Even though you may have restarted ​the latest lswsgi process, ​the old running ​processes ​can cause restart issues. ​You may find, even if you switch to Apache, that these processes remainThe best way to deal with them is to log into the user via SSH and manually ​kill the processes. 
  • Admin
  • Last modified: 2023/03/25 13:24
  • by Lisa Clarke