Solved the problem! :) .. wsgi has a option to explicitly pass an
environment variable (given in the commandline).
Once i passed the http_proxy variable by this method web2py works
fine.
 I think the default uwsgi wizzard in cherokee is broken. I had to
define a custom source to get uwsgi + web2py to work.
i finally have cherokee + uwsgi + web2py working absolutely fine (with
proxy etc.)
will document everything and post it. thanks for everything.

On Feb 12, 8:47 pm, whowhywhat <mads...@gmail.com> wrote:
> Luis i did use the web2py auto config script to try out apache with
> WSGI.
> I too noticed that apache seems to hog memory (as compared to
> cherokee). I think Cherokee is a great web server as its documentation
> is really good.
> I will surely document how i set up Cherokee + WSGI + web2py and post
> it here or on the web2py wiki.
> i was seeing a total memory consumption of under 150MB with Cherokee,
> WSGI and web2py (4 WSGI processes)
> i have done this on my work machine (running turnkey Linux (based on
> Ubuntu 10.04) in a virtualbox). i will document and post what i have
> done on Monday (14th feb 2010)
>
> On Feb 12, 6:10 pm, Luis Díaz <diazluis2...@gmail.com> wrote:
>
> > I'm using a virtualization solution. (Proxmox)
>
> > I have a debian server 5,
> > installed by minimal changes in the script
> > "Setup web2py + apache + ssl + mod_wsgi + postgresql in FEW seconds"
> > I do not use postgresql on this server.
>
> > I have another server with debian virtualized 5 and in this I have
> > configured to allow external connections postgresql
>
> > I noticed a 638Mb memory consumption on the first server without
> > ejecutandoce web2py applications.
>
> > could comment as configurastes web2py and Cherokee
>
> > I want to lose the memory consumption and increase performance.
>
> > 2011/2/12 whowhywhat <mads...@gmail.com>
>
> > > Thanks for the quick replies.
> > > As Luis mentions i have used export http_proxy (but in /etc/
> > > environment and in the startup script of cherokee). I will try
> > > defining in /etc/profile
> > > i did some further testing by launching web2py with its own web
> > > server.
> > > by running "python web2py.py -c server.crt -k server.key -a password -
> > > i <IPADDRESS> -p 8888"
> > > This way web2py uses the proxy seamlessly (It works fine!)
>
> > > but when i deploy using wsgi either in apache or cherokee web2py does
> > > not see the proxy. what could be wrong? where is this problem
> > > occurring?
>
> > > Luis .. which is the web server and cgi setup you are using?
>
> > > i am really impressed with the speed of cherokee + wsgi + web2py, the
> > > memory foot print is small and the whole thing runs like greased
> > > lightning :D .. i just hope to solve this proxy issue.
>
> > > On Feb 11, 10:50 pm, Luis Díaz <diazluis2...@gmail.com> wrote:
> > > > I forgot.
> > > > if you need to specify username and password
> > > > then the structure would be something.
>
> > > > export http_proxy =http://username:password@proxy:port/
> > > > export https_proxy =http://username:password@proxy:port/
> > > > export ftp_proxy =http://username:password@proxy:port/
>
> > > > 2011/2/11 Luis Díaz <diazluis2...@gmail.com>
>
> > > > > Greetings,
> > > > > web2py I mention that I use in my work.
> > > > > and we have a proxy that we restrict the output
> > > > > by user name and password
>
> > > > > I have solved the problem properly configuring the proxy on the
> > > computer
> > > > > where I have installed debian web2py
>
> > > > > nano /etc/profile
>
> > > > > adding the following lines:
>
> > > > > export http_proxy =http://proxy.uc.edu.ve:5010/
> > > > > export https_proxy =http://proxy.uc.edu.ve:5010/
> > > > > export ftp_proxy =http://proxy.uc.edu.ve:5010/
>
> > > > > 2011/2/11 Massimo Di Pierro <massimo.dipie...@gmail.com>
>
> > > > > Thanks for your comments.
>
> > > > >> WHen you need urllib, and web2py.python makes outbound connections 
> > > > >> you
> > > > >> should not need a proxy server or any proxy configuration as far as I
> > > > >> can tell (and I am not sure about your setup). This looks more of a
> > > > >> firewall issue.
>
> > > > >> On Feb 11, 5:19 am, whowhywhat <mads...@gmail.com> wrote:
> > > > >> > web2py is the first framework i actually enjoy using. :) .. been
> > > > >> > advocating it to everyone i meet these days. I sincerely thank the
> > > > >> > entire web2py community for everything.
>
> > > > >> > I have been developing a small web2py application for intranet use
> > > at
> > > > >> > the place where i work. During development i used windows (i carry
> > > > >> > web2py on a thumb drive). At work we use a proxy for net access and
> > > in
> > > > >> > windows i have no problems with web2py accessing the net using the
> > > > >> > proxy.
> > > > >> > I can use urllib to fetch webpages etc.
>
> > > > >> > To deploy the app i am using Ubuntu. I have deployed web2py using
> > > both
> > > > >> > apache as well as Cherokee using WSGI. The application runs fine.
> > > > >> > however the web2py environment is not able to fetch anything from
> > > the
> > > > >> > internet. urllib does not fetch any webpages. I have explicitly set
> > > > >> > the http_proxy environment variable (in /etc/environment, in the
> > > > >> > Cherokee startup script). I need to fetch data from the web, mostly
> > > > >> > for openID authentication. I am not sure what's wrong.
>
> > > > >> > how can i make web2py/python use the proxy server (http_proxy)?
>
> > > > > --
> > > > > Díaz Luis
> > > > > TSU Analisis de Sistemas
> > > > > Universidad de Carabobo
>
> > > > > Facultad de Odontología<
> > >http://www.odontologia.uc.edu.ve/index.php?option=com_content&view=ar...>
>
> > > > --
> > > > Díaz Luis
> > > > TSU Analisis de Sistemas
> > > > Universidad de Carabobo
>
> > > > Facultad de Odontología<
> > >http://www.odontologia.uc.edu.ve/index.php?option=com_content&view=ar...>
>
> > --
> > Díaz Luis
> > TSU Analisis de Sistemas
> > Universidad de Carabobo
>
> > Facultad de 
> > Odontología<http://www.odontologia.uc.edu.ve/index.php?option=com_content&view=ar...>
>
>

Reply via email to