Connection limit exceeded for non-superusers
I am using Django with PostgreSQL and everything was ok but in the last weeks I get this error sometimes when loading my sites. I didn't make any changes to the database configuration so I don't know why it doesn't work sometimes. Anybody knows how to solve this? Is Django keeping db connections open somehow? Djangobook.com had the same problem (http://code.djangoproject.com/ ticket/3653) but I don't know how they solved that. TemplateSyntaxError at / Caught an exception while rendering: FATAL: connection limit exceeded for non-superusers Original Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/django/template/debug.py", line 71, in render_node result = node.render(context) File "/usr/lib/python2.5/site-packages/django/template/ defaulttags.py", line 126, in render len_values = len(values) File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line 81, in __len__ self._result_cache = list(self.iterator()) File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line 238, in iterator for row in self.query.results_iter(): File "/usr/lib/python2.5/site-packages/django/db/models/sql/ query.py", line 287, in results_iter for rows in self.execute_sql(MULTI): File "/usr/lib/python2.5/site-packages/django/db/models/sql/ query.py", line 2368, in execute_sql cursor = self.connection.cursor() File "/usr/lib/python2.5/site-packages/django/db/backends/ __init__.py", line 81, in cursor cursor = self._cursor() File "/usr/lib/python2.5/site-packages/django/db/backends/postgresql/ base.py", line 116, in _cursor self.connection = Database.connect(conn_string, **settings_dict ['DATABASE_OPTIONS']) OperationalError: FATAL: connection limit exceeded for non-superusers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Connection limit exceeded for non-superusers
I get this when I run the query: SELECT * FROM pg_stat_activity datid | datname | procpid | usesysid | usename | current_query | waiting | xact_start | query_start | backend_start | client_addr | client_port ---+---+-+--+--- +-+- +---+--- +---+-+- 17237 | django_es | 29167 |16608 | django_es | in transaction | f | 2009-09-29 15:00:02.04-05 | 2009-09-29 15:00:43.979417-05 | 2009-09-29 15:00:02.05414-05 | | -1 17237 | django_es | 29168 |16608 | django_es | in transaction | f | 2009-09-29 21:00:02.476379-05 | 2009-09-29 21:00:48.102082-05 | 2009-09-29 21:00:02.47496-05 | | -1 17237 | django_es | 11474 |16608 | django_es | in transaction | f | 2009-09-30 06:00:02.932235-05 | 2009-09-30 06:00:41.53456-05 | 2009-09-30 06:00:02.930783-05 | | -1 17237 | django_es | 22825 |16608 | django_es | in transaction | f | 2009-09-30 15:00:01.85973-05 | 2009-09-30 15:00:54.566471-05 | 2009-09-30 15:00:01.858281-05 | | -1 and 93 more rows! On 9 oct, 12:27, A Melé wrote: > I am using Django with PostgreSQL and everything was ok but in the > last weeks I get this error sometimes when loading my sites. I didn't > make any changes to the database configuration so I don't know why it > doesn't work sometimes. Anybody knows how to solve this? Is Django > keeping db connections open somehow? > > Djangobook.com had the same problem (http://code.djangoproject.com/ > ticket/3653) but I don't know how they solved that. > > TemplateSyntaxError at / > Caught an exception while rendering: FATAL: connection limit exceeded > for non-superusers > > Original Traceback (most recent call last): > File "/usr/lib/python2.5/site-packages/django/template/debug.py", > line 71, in render_node > result = node.render(context) > File "/usr/lib/python2.5/site-packages/django/template/ > defaulttags.py", line 126, in render > len_values = len(values) > File "/usr/lib/python2.5/site-packages/django/db/models/query.py", > line 81, in __len__ > self._result_cache = list(self.iterator()) > File "/usr/lib/python2.5/site-packages/django/db/models/query.py", > line 238, in iterator > for row in self.query.results_iter(): > File "/usr/lib/python2.5/site-packages/django/db/models/sql/ > query.py", line 287, in results_iter > for rows in self.execute_sql(MULTI): > File "/usr/lib/python2.5/site-packages/django/db/models/sql/ > query.py", line 2368, in execute_sql > cursor = self.connection.cursor() > File "/usr/lib/python2.5/site-packages/django/db/backends/ > __init__.py", line 81, in cursor > cursor = self._cursor() > File "/usr/lib/python2.5/site-packages/django/db/backends/postgresql/ > base.py", line 116, in _cursor > self.connection = Database.connect(conn_string, **settings_dict > ['DATABASE_OPTIONS']) > OperationalError: FATAL: connection limit exceeded for non-superusers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Connection limit exceeded for non-superusers
Looking at the postgresql log I can see it's probably the connection hasn't been closed: LOG: unexpected EOF on client connection Any ideas on this? Thank you. On 9 oct, 12:34, A Melé wrote: > I get this when I run the query: SELECT * FROM pg_stat_activity > > datid | datname | procpid | usesysid | usename | > current_query | waiting | xact_start > | query_start | backend_start | > client_addr | client_port > ---+---+-+--+--- > +-+- > +---+--- > +---+-+- > 17237 | django_es | 29167 | 16608 | django_es | in > transaction | f | 2009-09-29 15:00:02.04-05 | > 2009-09-29 15:00:43.979417-05 | 2009-09-29 15:00:02.05414-05 > | | -1 > 17237 | django_es | 29168 | 16608 | django_es | in > transaction | f | 2009-09-29 21:00:02.476379-05 | > 2009-09-29 21:00:48.102082-05 | 2009-09-29 21:00:02.47496-05 > | | -1 > 17237 | django_es | 11474 | 16608 | django_es | in > transaction | f | 2009-09-30 06:00:02.932235-05 | > 2009-09-30 06:00:41.53456-05 | 2009-09-30 06:00:02.930783-05 > | | -1 > 17237 | django_es | 22825 | 16608 | django_es | in > transaction | f | 2009-09-30 15:00:01.85973-05 | > 2009-09-30 15:00:54.566471-05 | 2009-09-30 15:00:01.858281-05 > | | -1 > > and 93 more rows! > > On 9 oct, 12:27, A Melé wrote: > > > > > I am using Django with PostgreSQL and everything was ok but in the > > last weeks I get this error sometimes when loading my sites. I didn't > > make any changes to the database configuration so I don't know why it > > doesn't work sometimes. Anybody knows how to solve this? Is Django > > keeping db connections open somehow? > > > Djangobook.com had the same problem (http://code.djangoproject.com/ > > ticket/3653) but I don't know how they solved that. > > > TemplateSyntaxError at / > > Caught an exception while rendering: FATAL: connectionlimitexceeded > > for non-superusers > > > Original Traceback (most recent call last): > > File "/usr/lib/python2.5/site-packages/django/template/debug.py", > > line 71, in render_node > > result = node.render(context) > > File "/usr/lib/python2.5/site-packages/django/template/ > > defaulttags.py", line 126, in render > > len_values = len(values) > > File "/usr/lib/python2.5/site-packages/django/db/models/query.py", > > line 81, in __len__ > > self._result_cache = list(self.iterator()) > > File "/usr/lib/python2.5/site-packages/django/db/models/query.py", > > line 238, in iterator > > for row in self.query.results_iter(): > > File "/usr/lib/python2.5/site-packages/django/db/models/sql/ > > query.py", line 287, in results_iter > > for rows in self.execute_sql(MULTI): > > File "/usr/lib/python2.5/site-packages/django/db/models/sql/ > > query.py", line 2368, in execute_sql > > cursor = self.connection.cursor() > > File "/usr/lib/python2.5/site-packages/django/db/backends/ > > __init__.py", line 81, in cursor > > cursor = self._cursor() > > File "/usr/lib/python2.5/site-packages/django/db/backends/postgresql/ > > base.py", line 116, in _cursor > > self.connection= Database.connect(conn_string, **settings_dict > > ['DATABASE_OPTIONS']) > > OperationalError: FATAL: connectionlimitexceededfor non-superusers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---