This is great Vasile! Will try it and report back.

On Aug 24, 4:55 pm, Vasile Ermicioi <elff...@gmail.com> wrote:
> [web2py]
> wgethttp://www.web2py.com/examples/static/web2py_src.zip
> unzip web2py_src.zip
> python2.7 web2py.py #seems needed before using it
>
> [uwsgi]
> wgethttp://projects.unbit.it/downloads/uwsgi-0.9.8.3.tar.gz
> tar xvzf uwsgi-0.9.8.3.tar.gz
> cd uwsgi-0.9.8.3
> /home/yourname/bin/python2.7 uwsgiconfig.py --build
> mv uwsgi /home/yourname/bin
> uwsgi --protocol=http --socket 127.0.0.1:your_custom_port_number
> --pythonpath /home/yourname/web2py --module wsgihandler -d
> /home/yourname/tmp/uwsgi.log -t 20 --async 24 --ugreen --limit-as 64 -r
> --no-orphans -M -p 1 --touch-reload /home/yourname/tmp/uwsgireload.txt
> --reload-on-rss 50
> touch /home/yourname/tmp/uwsgireload.txt
>
> [utils]
> ps -u fermer -o rss,command
>
> notes/comments:
>
>    -  --protocol=http means that you don't need another webserver
>    - it is still nginx + uwsgi because you have webfaction nginx instance in
>    front
>    - I use "touch /home/yourname/tmp/uwsgireload.txt" to reload uwsgi
>    server, it is useful when I change routes.py file, or adding some modules 
> in
>    site-packages folder
>    - -M -p 1  will generate 2 processes, a master process and a slave one
>
> an example of website powered by web2py+uwsgi+webfaction(nginx) 
> ishttp://fermer.md/(hosted in Amsterdam)
>
> for Johann: you need to check uwsgi documentation to configure itself these
> paramaters
>  --async 24    - number of green threads
>  --ugreen --limit-as 64  - memory limit per process !!!
>  -p 1    - number of processes, total memory that is allowed to be consumed
> is = number of processes * limit-as
>
> for Massimo:
> - Robert is working on uwsgi - pypy integration, please make web2py pypy
> compatible,
> - please add my website (fermer.md) to web2py powered websites and please
> add me to web2py professional website, or tell me what to do to achieve that
> thank you :)

Reply via email to