[Spacewalk-list] Postgres connection issues with Spacewalk 1.9

Patrick Hurrelmann patrick.hurrelmann at lobster.de
Mon Mar 11 15:38:34 UTC 2013


On 11.03.2013 16:21, Coffman, Anthony J wrote:
> Is anybody else seeing 500 errors on 1.9?
> 
> We've had ridiculous numbers (300-400) of Postgres IDLE connections since the 1.7 release but it seems they've reach new heights in Spacewalk 1.9.  I just ran a package refresh on 30 DEV systems and the Postgres connection count got up to around 1000 before things completely fell apart.
> 
> Max client for Postgres is currently set to 1200 (was 500 in 1.8).
> 
> Symptom is 500 errors that look something like this.
> 
> Exception Handler Information
> Traceback (most recent call last):
>   File "/usr/lib/python2.6/site-packages/spacewalk/server/apacheHandler.py", line 80, in headerParserHandler
>     rhnSQL.initDB()
>   File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/__init__.py", line 102, in initDB
>     __init__DB(backend, host, port, username, password, database)
>   File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/__init__.py", line 55, in __init__DB
>     __DB.connect()
>   File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py", line 174, in connect
>     return self.connect(reconnect=0)
>   File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py", line 163, in connect
>     password=self.password)
> SQLConnectError: (None, None, 'spaceschema', 'Attempting Re-Connect to the database failed')
> 
> Local variables by frame
> Frame connect in /usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py at line 179
>                         self = <type 'instance'> <spacewalk.server.rhnSQL.driver_postgresql.Database instance at 0x7f75ea5617e8>
>                            e = <class 'psycopg2.OperationalError'> server closed the connection unexpectedly
>         This probably means the server terminated abnormally
>         before or while processing the request.
> could not send startup packet: Broken pipe
> 
>                    reconnect = <type 'int'> 0
> 
> Frame connect in /usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py at line 174
>                         self = <type 'instance'> <spacewalk.server.rhnSQL.driver_postgresql.Database instance at 0x7f75ea5617e8>
>                            e = <class 'psycopg2.OperationalError'> server closed the connection unexpectedly
>         This probably means the server terminated abnormally
>         before or while processing the request.
> could not send startup packet: Broken pipe
> 
> Thanks and regards,
> --Tony

Hi,

try updating the python-psycopg2 package. A newer one was released with
RHEL 6.4 (https://rhn.redhat.com/errata/RHBA-2013-0327.html). The old
one had problems with ref-counting and leaked connections. For me the
problem with high connection count was solved by the update.

Regards
Patrick

-- 
Lobster LOGsuite GmbH, Münchner Straße 15a, D-82319 Starnberg

HRB 178831, Amtsgericht München
Geschäftsführer: Dr. Martin Fischer, Rolf Henrich




More information about the Spacewalk-list mailing list