I haven't overridden any locale or language settings.

In case it offers some sort of clue, this always seems to happen
immediately after when Apache starts a new daemon process, never with
a process that has been serving requests for a while.

On Jan 11, 1:36 pm, Graham Dumpleton <[email protected]>
wrote:
> You may want to ask this one on:
>
>  http://groups.google.com/group/django-users
>
> if you haven't done so already in case it is caused by something
> Django specific.
>
> Since you are running in a daemon process then presumably no other
> applications running in same process that code be fiddling default
> encoding. Although in this case it is almost like all the registered
> codecs have vanished.
>
> BTW, have you overridden locale or language settings in your user
> environment. Under Apache any such per user overrides will not be
> getting used and instead system wide locale and language settings will
> apply. Not sure if this will matter or not though.
>
> Graham
>
> 2010/1/12 Kevin Lacker <[email protected]>:
>
>
>
> > I'm running into some strange errors with mod_wsgi. Here's a stack
> > trace - this happens every few hours or so for a site with around 1
> > request per second load:
>
> > [Sun Jan 10 10:14:02 2010] [error] [client 127.0.0.1] mod_wsgi
> > (pid=29947): Exception occurred within WSGI script '/home/prod/repo/
> > web/apache/django.wsgi'.
> > [Sun Jan 10 10:14:02 2010] [error] [client 127.0.0.1] Traceback (most
> > recent call last):
> > [Sun Jan 10 10:14:02 2010] [error] [client 127.0.0.1]   File "/var/lib/
> > python-support/python2.5/django/core/handlers/wsgi.py", line 231, in
> > __call__
> > [Sun Jan 10 10:14:03 2010] [error] [client 127.0.0.1]
> > set_script_prefix(base.get_script_name(environ))
> > [Sun Jan 10 10:14:03 2010] [error] [client 127.0.0.1]   File "/var/lib/
> > python-support/python2.5/django/core/handlers/base.py", line 199, in
> > get_script_name
> > [Sun Jan 10 10:14:03 2010] [error] [client 127.0.0.1]     return
> > force_unicode(environ.get('SCRIPT_NAME', u''))
> > [Sun Jan 10 10:14:03 2010] [error] [client 127.0.0.1]   File "/var/lib/
> > python-support/python2.5/django/utils/encoding.py", line 68, in
> > force_unicode
> > [Sun Jan 10 10:14:03 2010] [error] [client 127.0.0.1]     s = s.decode
> > (encoding, errors)
> > [Sun Jan 10 10:14:03 2010] [error] [client 127.0.0.1] LookupError: no
> > codec search functions registered: can't find encoding
>
> > I added print statements and the encoding is simply "utf-8" here, and
> > s is the empty string. When I run "".decode("utf-8") from the python
> > interpreter, it works fine. How could this be happening?
>
> > I'm running mod_wsgi in daemon mode with the parameters
>
> >    WSGIDaemonProcess prod processes=3 maximum-requests=500 threads=10
> >    WSGIProcessGroup prod
> >    WSGIScriptAlias / /home/prod/repo/web/apache/django.wsgi
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "modwsgi" 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 
> > athttp://groups.google.com/group/modwsgi?hl=en.
-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" 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/modwsgi?hl=en.


Reply via email to