Timeout issue between mapserver and postgresql

zze-SIGALE PORTANERI F ext RD-BIZZ-SOP fportaneri.ext at RD.FRANCETELECOM.COM
Wed Apr 5 09:54:37 EDT 2006


Hi Greg,

Thanks for you prompt answer!!!

The postgres log just shows several lines like:

"WARNING: there is no transaction in progress"
...

May be the level of debug is too low... but on an other side, I guess that a fatal error would had been logged anyway...


The posgresql.conf sets:

max_connections : 100
work_mem : 1024 
superuser_reserved_connections : 2


I am not sure max_connections is the problem since when a session is stuck, I still can open sessions in a new browser using the "uuuuu" user...

Thanks again,
Franck



-----Message d'origine-----
De : UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] De la part de Gregory S. Williamson
Envoyé : mercredi 5 avril 2006 14:39
À : MAPSERVER-USERS at LISTS.UMN.EDU
Objet : Re: [UMN_MAPSERVER-USERS] Timeout issue between mapserver and postgresql

What error(s) is/are postgres reporting ?

Check the configuration file (postgresql.conf) for postgres and see what max_connections is set to. It may be low enough that you are bumping into this threshold. Each connection takes work_mem kilobytes so you don't want to have too many connections allowed with a lot of memory for each; it can cause poor performance on the postgres side of things. Not having enough connections could cause the problem you describe.

If the superuser_reserved_connections is set you might see this when you have run out of normal connections for user "uuuuu" but connecting as user postgres from a terminal might be allowed if there are less than superuser_reserved_connections being used by postgres or other super user accounts.

HTH,

Greg Williamson
DBA
GlobeXplorer LLC


-----Original Message-----
From:	UMN MapServer Users List on behalf of zze-SIGALE PORTANERI F ext RD-BIZZ-SOP
Sent:	Wed 4/5/2006 5:26 AM
To:	MAPSERVER-USERS at LISTS.UMN.EDU
Cc:	
Subject:	[UMN_MAPSERVER-USERS] Timeout issue between mapserver and postgresql


Hi list,

I have a dual server configuration with :
	server 1:  Cartoweb 3 + php 5.0.3  + mapserver 4.6.0 
	server 2:  postgresql 8.0.3 + postgis 0.9.1 

Everything is OK during the first part of the session, the cartoweb well displays the mapserver generated maps thought the postgis data, the connection is OK.

After some time (let say 10 refresh of the about 20 layers mapfile), I have a timeout issue :  The message is the following

FATAL ServerContext - Error in msPOSTGISLayerOpen(): couldnt make connection to DB with connect string 'host=XXX.XXX.XXX.XXX dbname=ddddd user=uuuuu password=pppppp'. 
Error reported was 'could not connect to server: Connection timed out Is the server running on host "XXX.XXX.XXX.XXX" and accepting TCP/IP connections on port 5432? '. 

The strange thing is that when this happen, I still can open a new session (new browser window) in parallel and access to the same data (so the database is still up and running).

Any idea to where investigate?

Thanks in advance,
Franck


!DSPAM:4433b7b175321133564134!



More information about the mapserver-users mailing list