简体   繁体   中英

Python, Django and Threading problem

Greetings, Under django 1.2 and Postgresql via psycopg2, I have a custom command that does heavy database actions (via Django ORM). I wrote it with threat pool via using the code here

Now my problem is, I get:

  File "/usr/lib/python2.5/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 136, in _cursor
    self.connection = Database.connect(**conn_params)
psycopg2.OperationalError: FATAL:  connection limit exceeded for non-superusers

Error, how can I overcome this issue?

Thanks

您必须更改您的postgresql配置文件以允许更多连接。

increase max_connections parameter or use a pooling daemon. max_connections costs ~400 bytes of shared memory per connection slot, plus lock space.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM