Code

Opened 5 years ago

Closed 5 years ago

#11798 closed (wontfix)

Django persistent psycopg2 database connection

Reported by: Mike Tkachuk <mike@…> Owned by: nobody
Component: Database layer (models, ORM) Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Hi folks,

I've strugled with slow performance of django and found that the source is the all time reconnect to database, so I implemented the custom psycopg2 based database engine that improved the performance from 350 to 1600 requests per second (on small page with few SELECTs). To use it
just save the file base.py in any directory (e.g. postgresql_psycopg2_persistent) and set in settings

DATABASE_ENGINE to projectname.postgresql_psycopg2_persistent

Please let me know what you think.

Attachments (1)

base.py (1.1 KB) - added by Mike Tkachuk <mike@…> 5 years ago.

Download all attachments as: .zip

Change History (2)

Changed 5 years ago by Mike Tkachuk <mike@…>

comment:1 Changed 5 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

The suggestion for any sort of connection pooling has been rejected several times, if you disagree with this I suggest making your case on the django-developers mailing list, for now closing as wontfix.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.