On 11 nov, 14:17, Janusz Harkot <janusz.har...@gmail.com> wrote:
> Request Method: GET
> Request URL:    http://localhost/
> Exception Type: OperationalError
> Exception Value:
> server closed the connection unexpectedly
>         This probably means the server terminated abnormally
>         before or while processing the request.
>
> Have you ever get such an exception running django as fastcgi?
>
> First time I've got this exception was on pre-1.0 Django, only when
> runfcgi's "method" was set to prefork,
> fortunately on threaded code was working fine.
>
> Until recently I was curious to test this on Django 1.1.1. Will this
> exception be thrown again... surprise, there it was again.

Same here.
>
> Other option, in my opinion quite clean, is to write somewhere in your
> application small piece of code:
> from django.db import connection
> from django.core import signals
>
> def close_connection(**kwargs):
>     connection.close()
>
> signals.request_started.connect(close_connection)

Thanks a lot!

--

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=.


Reply via email to