Changes between Initial Version and Version 1 of Ticket #36957


Ignore:
Timestamp:
Feb 27, 2026, 4:00:35 AM (4 hours ago)
Author:
Anna
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36957 – Description

    initial v1  
    1 Django's PostgreSQL backend stores psycopg_pool.ConnectionPool objects in a class-level dict (DatabaseWrapper._connection_pools). When gunicorn (or any pre-forking server) forks worker processes, all children inherit references to the same pool objects — and crucially, the same underlying TCP sockets to PostgreSQL. Multiple workers then read/write the same socket concurrently, corrupting the PostgreSQL wire protocol.
     1Django's PostgreSQL backend stores `psycopg_pool.ConnectionPool` objects in a class-level dict (`DatabaseWrapper._connection_pools`). When gunicorn (or any pre-forking server) forks worker processes, all children inherit references to the same pool objects — and crucially, the same underlying TCP sockets to PostgreSQL. Multiple workers then read/write the same socket concurrently, corrupting the PostgreSQL wire protocol.
    22
    33
     
    3636Python 3.12 – 3.14
    3737
     38The minimal reproducible example project is in the attachments
     39
Back to Top