Since , mod_python keeps a stale database connection for each HTTP request
|Reported by:||Ilya Semenov <semenov@…>||Owned by:||adrian|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Since , a template is lazy-rendered. However under mod_python environment, the signal to close database connection (signals.request_finished) is sent before a template is actually rendered. If a connection is then reopened by demand during the rendering process, it will not be ever closed again and result in a stale connection, which soon overwhelms the database server.
Attached the proposed patch (sending the request_finished signal after the template is actually rendered).
Note: this can also fix #4612, though I'm not completely sure.
Change History (5)
Changed 7 years ago by Ilya Semenov <semenov@…>
comment:1 Changed 7 years ago by Ilya Semenov <semenov@…>
- Has patch set
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset