It is almost impossible to suggest anything about your problem as you
don't post the complete details of the actual errors you are getting.
If you want solutions, you need to provide that extra information so
we don't have to imagine what the Python exception and traceback you
are getting is.

FWIW, you can use Apache/mod_wsgi as a development server. The only
significant thing you miss in its default configuration is automatic
restarts when code is changed. For that, you either manually touch the
WSGI script file to trigger a restart (in daemon mode) when you have
completed a set of changes, or employ the additional recipe to Apache/
mod_wsgi to have it reload code automatically. By doing development
under Apache/mod_wsgi your almost certain to come across the problems
before deployment.

Have a read of:

  http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode
  http://blog.dscpl.com.au/2008/12/using-modwsgi-when-developing-django.html
  http://blog.dscpl.com.au/2009/02/source-code-reloading-with-modwsgi-on.html

Graham

On Mar 9, 12:30 am, felix <crucialfe...@gmail.com> wrote:
> On Mar 8, 1:25 am, Graham Dumpleton <graham.dumple...@gmail.com>
> wrote:
>
> > You don't say anything about what hosting mechanisms you are using for
> > each.
>
> local: django's runserver
> staging: mod_wsgi apache
>
> one thing I should do is test locally using wsgi
>
> Do you have any suggestions regarding question 2:
>
> how can I do a quick test on the deployment environment to trigger
> these import errors ?
>
> I opened a manage.py shell and ran the same code as in my .wsgi
> ...
> application = django.core.handlers.wsgi.WSGIHandler()
>
> no problems.
>
> earlier I said it was during start up. that's wrong, it was after
> loading some pages.
>
> specifically if I loaded one page as the first load, then it triggered
> the import error.
> if I loaded the front page it did not.  that would be hell on a live
> site.
>
> this is of course a clue to the problem, but I'm not trying to solve
> the problem.  I already solved that one.
>
> I'm trying to find a way to detect Unknown Unknowns.
>
> so probably I need to do a few requests using that test WSGIHandler
>
> I also saw it returning a 404 for an admin page, but only for 1 out of
> every 4 requests !  yep, I have 4 threads on the WSGIDaemonProcess.
> and one of them loaded up the admin wrong.  a restart fixed it.
>
> another thing I'm thinking about is a way to notify me by email when
> an exception escapes django's grasp and gives that black and white
> apache 500 notification.
>
> it should be possible to just wrap that WSGIHandler with a simple wsgi
> app, catch any exceptions, email quickly and then return a simple html
> display.
>
> there needs to be one more line of defense.
>
>
>
> > The Django runserver does extra automagic setup steps which aren't by
> > default going to be done by other hosting mechanisms. Part of this is
> > solved by manual setup of sys.path, but not necessarily all that is
> > necessary.
>
> > Graham

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to