Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
litespeed_wiki:cloudlinux:enable_ruby_python_selector [2019/11/29 16:08] Lisa Clarke [Restart Python and Ruby Application] Copyediting |
litespeed_wiki:cloudlinux:enable_ruby_python_selector [2021/08/20 20:33] Jackson Zhang [Troubleshooting] |
||
---|---|---|---|
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'' ==== | ||
The Python and Ruby application can be restarted 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: | 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> | <code>touch /home/user1/mypythonapp/tmp/restart.txt</code> | ||
+ | |||
+ | If /home/user1/mypythonapp/tmp/restart.txt exits already, you will still need to "touch" it. | ||
This will tell the server to restart the application. | This will tell the server to restart the application. | ||
+ | ==== Through CloudLinux Python application manager ==== | ||
+ | If you run cpanel and CloudLinux Python application manager, you can restart the Python application there. | ||
===== Troubleshooting ===== | ===== Troubleshooting ===== | ||
+ | ==== The application does not work properly ==== | ||
If your application does not work properly, you can try two simple steps to check if the application has been setup properly: | If your application does not work properly, you can try two simple steps to check if the application has been setup properly: | ||
- If possible, switch back to Apache temporarily to verify if the application works properly under Apache. | - If possible, switch back to Apache temporarily to verify if the application works properly under Apache. | ||
Line 50: | Line 56: | ||
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 ==== | ||
+ | |||
+ | ''touch tmp/restart.txt'' or CL Python manager restart can not restart Python application. Most likely there are some old lswsgi processes. | ||
+ | <code> | ||
+ | ps -ef | grep pythontest | ||
+ | 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+ 1470047 1 0 Jul19 ? 00:10:36 /opt/alt/python37/bin/lswsgi -m /home/pythontest/pyapp1/passenger_wsgi.py | ||
+ | pythont+ 1900598 1866381 0 15:14 ? 00:00:00 /opt/alt/python37/bin/lswsgi -m /home/pythontest/pyapp1/passenger_wsgi.py | ||
+ | root 1902042 1898738 0 15:22 pts/2 00:00:00 grep --color=auto pythontest | ||
+ | pythont+ 2741844 1 0 Jul23 ? 00:08:41 /opt/alt/python37/bin/lswsgi -m /home/pythontest/pyapp1/passenger_wsgi.py | ||
+ | </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. |