1

Django's backend (firebird) problem reconnecting to database was fixed as here by disabling request finishing signal. It works on the development server, but when the project was deployed with mod_wsgi connections it again started to reinitialize for each request. How can I fix it? Thanks.

p.s my connection is very expensive (about 1sec.)

Community
  • 1
  • 1
histrio
  • 1,217
  • 13
  • 24

1 Answers1

0

Are you sure that the connections aren't being created from distinct processes. Depending on how you run mod_wsgi then multiple processes could be involved in accepting and handling requests. See:

http://code.google.com/p/modwsgi/wiki/ProcessesAndThreading

Make sure you are using mod_wsgi daemon mode with default of a single process and see if observed behaviour changes.

Graham Dumpleton
  • 57,726
  • 6
  • 119
  • 134