actually, i was running gunicorn like this

gunicorn -c config_gunicorn.py code:subdomain_app_wsgi


and config_gunicorn.py has
import web

i need web.py in config_gunicorn to connect to a database for post_request &
pre_request functions.

if i remove import web from config_gunicorn.py, then the app starts with
debug mode=False.


so here is the problem:

if a config file used to start gunicorn, and if web.py is imported in it,
app starts in debug mode.


On Sun, Oct 31, 2010 at 5:47 PM, kevin <[email protected]> wrote:

> thanks for the reply.
>
>
> i updated to latest gunicorn, but it is still starting with debug mode
> True.
>
> i have domain based sub applications. is there anything i can do to fix
> this?
>
> $ gunicorn --version
> 0.11.2.e52f06c-git
>
>
>
> code.py:
>
> import a,b
> mappings = (
>   "A.APP.com", a.app,
>   "B.APP.com", b.app,
> )
>
> def session_mw(app):
>     return SessionMiddleware(app, **config_beaker)
>
>
> subdomain_app = web.subdomain_application(mappings)
> subdomain_app_wsgi = subdomain_app.wsgifunc(session_mw)
>
>
>
>
> running gunicorn:
> gunicorn code:subdomain_app_wsgi
>
>
>
>
>
>
> On Sun, Oct 31, 2010 at 5:31 PM, Anand Chitipothu <[email protected]>wrote:
>
>> web.config.debug is set to False by default if you run the latest
>> version of gunicorn.
>>
>> The latest version of gunicorn passes SERVER_SOFTWARE environment
>> variable to the worker process and web.py sets debug=False when
>> SERVER_SOFTWARE is available in env.
>>
>> Anand
>>
>> 2010/10/31 kevin <[email protected]>:
>> > On Sat, Oct 30, 2010 at 7:30 PM, Anand Chitipothu <[email protected]
>> >
>> > wrote:
>> >>
>> >> 2010/10/31 kevin <[email protected]>:
>> >> > code.py:
>> >> > app = web.application(urls, locals())
>> >> > app_wsgi = app.wsgifunc(session_mw)
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > gunicorn code:app_wsgi
>> >> >
>> >> > if i run gunicorn like this, web.config.debug is True. what is the
>> >> > correct
>> >> > way to deploy using gunicorn so web.config.debug is False?
>> >>
>> >> The only way right now is to set web.config.debug = False before
>> >> creating the app.
>> >
>> > that makes it difficult for development/deployment, changing it
>> everytime.
>> >
>> > if i run gunicorn like this:
>> > PHP_FCGI_CHILDREN=3 gunicorn code:app_wsgi
>> >
>> > web.py does not start in debug mode. do you know what is going on? is it
>> ok
>> > to do like this?
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups
>> > "web.py" group.
>> > To post to this group, send email to [email protected].
>> > To unsubscribe from this group, send email to
>> > [email protected]<webpy%[email protected]>
>> .
>> > For more options, visit this group at
>> > http://groups.google.com/group/webpy?hl=en.
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "web.py" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected] <webpy%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/webpy?hl=en.
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to