hi,
Currently it is running on apache. How do I make the switch to uwsgi and disable apache?
go to webfaction panel and do 2 things:
- remove app that is running on top of apache
- create a custom app listening on a port
then connect via ssh to your webfaction account and do that
[install web2py]
unzip web2py_src.zip
python2.7 web2py.py
cd /home/your_user
[install uwsgi]
tar xvzf uwsgi-1.0.2.1.tar.gz
cd uwsgi-1.0.2.1
/home/your_user/bin/python2.7 uwsgiconfig.py --build
mv uwsgi /home/your_user/bin
cd /home/your_user
[start uwsgi]
uwsgi --http 127.0.0.1:your_custom_port --pythonpath /home/your_user /web2py --module wsgihandler -d /home/your_user/tmp/uwsgi.log -t 20 -r --no-orphans -M -p 2 --touch-reload /home/your_user/tmp/uwsgireload.txt --evil-reload-on-rss 100
How do I know what are the unnecessary processes and kill them?
ps -u your_user -o rss,command
that will show you your processes and how much memory they use
ps -u your_user
will show ids of processes
and
kill -9 id_of_process