Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using web2py with Passenger #1413

Closed
jtkorb opened this issue Jul 30, 2016 · 6 comments
Closed

using web2py with Passenger #1413

jtkorb opened this issue Jul 30, 2016 · 6 comments

Comments

@jtkorb
Copy link

jtkorb commented Jul 30, 2016

I'm using web2py on Dreamhost with the recommended Phusion Passenger as the deployment web server. I configured the web2py handlers/wsgihandler.py as recommended by Dreamhost users (adding lines to launch python in a virtual environment), creating passenger_wsgi.py. With just these edits, Passenger reported a timeout error from the application (web2py).

The Passenger debugging startup page notes that Passenger uses stdout for communication with the application and assumes that it is not "closed, overwritten, or redirected" by the application.

Web2py overwrites stdout with stderr on line 31 in wsgihandler.py. When I comment out this line, web2py (and Passenger) startup just fine and seem to work, although I haven't done much testing beyond startup.

So, my question is, is this line necessary? If so, is there a fix to make this setup work properly? If web2py requires both file descriptors pointing to the same place, maybe set stderr = stdout instead?

@niphlod
Copy link
Member

niphlod commented Aug 8, 2016

@mdipierro : any insights on why https://github.com/web2py/web2py/blob/master/handlers/wsgihandler.py#L35 is stricly needed ?

@mdipierro
Copy link
Contributor

Yes. For Google App Engine.

@niphlod
Copy link
Member

niphlod commented Aug 8, 2016

ahem. why do we have a gaehandler.py then ?! :D

@mdipierro
Copy link
Contributor

You are right. I guess it is not critically necessary. We could remove it.

@niphlod
Copy link
Member

niphlod commented Sep 21, 2016

will be fixed in #1459 . @jtkorb thanks for reporting, and sorry for taking so long to have it fixed ..........................

@jtkorb
Copy link
Author

jtkorb commented Sep 22, 2016

Thanks, glad to get it fixed!

mdipierro added a commit that referenced this issue Sep 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants