[Spacewalk-list] Spacewalk 1.2 and postgresql - too many clients already

Michal Bruncko michal.bruncko at zssos.sk
Fri Dec 3 14:21:34 UTC 2010


Hi list

Please, what is the recommened (or minimum recommened) number of running 
postgresql instances (max_connections parameter in postgresql.conf) for 
spacewalk?
I am using postgresql db only for spacewalk and I have registered 
approx. 20 clients. For now, I am using only packages distribution to 
clients from repozitories, without errata nor audit or monitoring. And 
have received sometimes (mainly after spacewalk machine restart) RHN 
Traceback messages complains about DB (re-)connection.
Default value of max_connections was 100 and I've increased it to 500, 
but I guess it isnt enough because I have also received same connection 
problems messages from spacewalk in time (tventy-threety mails in row). 
And when I have logged into spacewalk server there was all 500 instances 
of postgresql running. With oracle DB that I've using it before potrges 
I never have same problems (with default oracle configuration).

thanks

michal

------------------------------------------------------------------------

Exception reported from spacewalk.example.com
Time: Thu Dec  2 10:12:29 2010
Exception type<class 'spacewalk.server.rhnSQL.sql_base.SQLConnectError'>
Request object information:
URI: /XMLRPC
Remote Host: log.example.com
Server Name: spacewalk.example.com:80
Headers passed in:
	Accept-Encoding: identity
	CONTENT_LENGTH: 122
	CONTENT_TYPE: text/xml
	DOCUMENT_ROOT: /var/www/html
	GATEWAY_INTERFACE: CGI/1.1
	HTTP_ACCEPT_ENCODING: identity
	HTTP_HOST: spacewalk.example.com
	HTTP_USER_AGENT: rhn.rpclib.py/$Revision$
	HTTP_X_CLIENT_VERSION: 1
	HTTP_X_INFO: RPC Processor (C) Red Hat, Inc (version $Revision$)
	HTTP_X_RHN_TRANSPORT_CAPABILITY: follow-redirects=3
	HTTP_X_TRANSPORT_INFO: Extended Capabilities Transport (C) Red Hat, Inc (version $Revision$)
	Host: spacewalk.example.com
	NLS_LANG: english.AL32UTF8
	ORACLE_HOME: /opt/oracle
	PATH_INFO:
	QUERY_STRING:
	REMOTE_ADDR: 172.30.0.35
	REMOTE_PORT: 44790
	REQUEST_METHOD: POST
	REQUEST_URI: /XMLRPC
	SCRIPT_FILENAME: /usr/share/rhn/wsgi/xmlrpc.py
	SCRIPT_NAME: /XMLRPC
	SCRIPT_URI:http://spacewalk.example.com/XMLRPC
	SCRIPT_URL: /XMLRPC
	SERVER_ADDR: 172.30.0.55
	SERVER_ADMIN: root at localhost
	SERVER_NAME: spacewalk.example.com
	SERVER_PORT: 80
	SERVER_PROTOCOL: HTTP/1.1
	SERVER_SIGNATURE:<address>Apache Server at spacewalk.example.com Port 80</address>

	SERVER_SOFTWARE: Apache
	User-Agent: rhn.rpclib.py/$Revision$
	X-Client-Version: 1
	X-Info: RPC Processor (C) Red Hat, Inc (version $Revision$)
	X-RHN-Transport-Capability: follow-redirects=3
	X-Transport-Info: Extended Capabilities Transport (C) Red Hat, Inc (version $Revision$)
	mod_wsgi.application_group: aphrodite.example.com|/xmlrpc
	mod_wsgi.callable_object: application
	mod_wsgi.handler_script:
	mod_wsgi.input_chunked: 0
	mod_wsgi.listener_host:
	mod_wsgi.listener_port: 80
	mod_wsgi.process_group:
	mod_wsgi.request_handler: wsgi-script
	mod_wsgi.script_reloading: 1
	mod_wsgi.version: (3, 1)
	wsgi.errors:<mod_wsgi.Log object at 0x7f5ae7c84bf0>
	wsgi.file_wrapper:<built-in method file_wrapper of mod_wsgi.Adapter object at 0x7f5ae84b4468>
	wsgi.input:<mod_wsgi.Input object at 0x7f5ae83cb9f0>
	wsgi.multiprocess: True
	wsgi.multithread: False
	wsgi.run_once: False
	wsgi.url_scheme: http
	wsgi.version: (1, 1)

Exception Handler Information
Traceback (most recent call last):
   File "/usr/lib/python2.6/site-packages/spacewalk/server/apacheHandler.py", line 77, in headerParserHandler
     rhnSQL.initDB()
   File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/__init__.py", line 118, in initDB
     __init__DB(backend, host, port, username, password, database)
   File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/__init__.py", line 59, in __init__DB
     __DB.check_connection()
   File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py", line 178, in check_connection
     self.connect() # only allow one try
   File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py", line 156, in connect
     return self.connect(reconnect=0)
   File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py", line 160, in connect
     [self.database, e.pgcode, e.pgerror, "Attempting Re-Connect to the database failed",])
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 160
	                self =<type 'instance'>  <spacewalk.server.rhnSQL.driver_postgresql.Database instance at 0x7f5ae83d76c8>
	e =<class 'psycopg2.OperationalError'>  FATAL:  sorry, too many clients already

	           reconnect =<type 'int'>  0

Frame connect in /usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py at line 156
	                self =<type 'instance'>  <spacewalk.server.rhnSQL.driver_postgresql.Database instance at 0x7f5ae83d76c8>
	e =<class 'psycopg2.OperationalError'>  FATAL:  sorry, too many clients already

	           reconnect =<type 'int'>  1



-- 
Ing. Michal Bruncko, CCNP
Linux systems and network administrator

Coupled school of business and services Ruzomberok
Slovak Republic

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20101203/c4ebc447/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2962 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20101203/c4ebc447/attachment.p7s>


More information about the Spacewalk-list mailing list