Maintenance & Debugging after deployment

18 views
Skip to first unread message

Ahmed

unread,
Jan 6, 2012, 6:02:22 AM1/6/12
to pylons-discuss
Hello all,

I have just deployed my first pyramid website after 8 months of
coding.

I would like to thank all of you for the great software you are
providing us. I was lucky that as I was just beginning to learn python
and web development, Pyramid was reaching 1.00 (I started with Pylons/
Turbogears at first but did not feel comfortable, but once I started
reading the pyramid docs I got hooked and I knew I found the right
framework.) Actually I think Pyramid will conquer the world (of web
python frameworks).

I successfully deployed on apache, mod_python.
http://docs.pylonsproject.org/projects/pyramid/en/1.0-branch/tutorials/modwsgi/index.html
but I remember two things:

the wsgi script in docs:
from pyramid.paster import get_app
application = get_app(
'/Users/chrism/modwsgi/env/myapp/production.ini', 'main')

failed to load the site,

so I had to prepend
import site
site.addsitedir('/home/ahmed/dev/pyrenv/lib/python2.6/site-packages')

The addsitedir properly adds your site packages dir properly,
including following down all *.pth files etc.

Is it policy to open a git issue for a doc change? I am ready to do
that.

Since I am an amateur, I would like to get your experience on how to
properly continuously maintain (and debug) your deployed website once
you get it running.

I already try to replicate the production env on my pc (and I use a
"git push web" for deploying .. really cool), but was wondering if I
will ever have to do a debug on the production machine itself in a
case of a bug?? Can I do another wsgi script but using the
development.ini this time ... and set that up on a different url e.g.
127.0.0.1/app-debug (and password-protect it of course)... or should I
occasionally run paster serve --development.ini on the server only
when needed?

I would like to your thoughts and best practice on this one.

Ahmed

Michael Merickel

unread,
Jan 6, 2012, 12:05:36 PM1/6/12
to pylons-...@googlegroups.com
On Fri, Jan 6, 2012 at 5:02 AM, Ahmed <ahmed...@gmail.com> wrote:
Is it policy to open a git issue for a doc change? I am ready to do
that.

A pull request with the changes is ideal, otherwise an issue or an email are fine. :-) 

cd34

unread,
Jan 6, 2012, 12:12:44 PM1/6/12
to pylons-discuss
On Jan 6, 6:02 am, Ahmed <ahmedba...@gmail.com> wrote:
> "git push web" for deploying .. really cool), but was wondering if I
> will ever have to do a debug on the production machine itself in a
> case of a bug?? Can I do another wsgi script but using the

Take a look at pyramid_exclog. It will mail any exception generated to
you so that you can have production.ini using that, and
development.ini set to use weberror or whatever debugging system you
use.
Reply all
Reply to author
Forward
0 new messages