<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7226.0">
<TITLE>Timeout issue between mapserver and postgresql</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<BR>

<P><FONT SIZE=2 FACE="Arial">Hi list,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I have a dual server configuration with :</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">server 1:&nbsp; Cartoweb 3 + php 5.0.3&nbsp; + mapserver 4.6.0 </FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">server 2:&nbsp; postgresql 8.0.3 + postgis 0.9.1 </FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">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.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">After some time (let say 10 refresh of the about 20 layers mapfile), I have a timeout issue :&nbsp; The message is the following</FONT></P>

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

<BR><FONT SIZE=2 FACE="Arial">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).</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Any idea to where investigate?</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Thanks in advance,</FONT>

<BR><FONT SIZE=2 FACE="Arial">Franck</FONT>
</P>

</BODY>
</HTML>