<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr">I removed all the layers that use OGR connection but that didn't solve the problem either. <br><br>But we did isolate the problem to two particular layers: There are two thematic maps that 'cannot' coexist. The timeout occurs only when those two layers come into the picture. I can display only one of these two thematic maps. Each of these layers
contains about 100 polygons and are joined to tables which contain
about 600 records. I am at a complete loss!!!!<br><br>I have pasted the map file specs for those two layers below. I have also attached my most recent hs_err*.log.<br><br>This time I also set DEBUG 5 in my mapfile and interestingly the "ms_error.txt" has no entries after the timeout occurs. There are no errors reported there.<br>

<br>I do have some mapserver questions:<br>1) If I have 5 POSTGIS layer definitions and 7 Mapinfo layers(which I removed) in a mapfile does that mean that I have 12 connections that are made or is this considered a single connection?<br>

<br>2) Does Java Mapscript have a limit on the number of records that it can retrieve per request?<br><br>3) What happens between Mapserver, Java Mapscript and JVM? My hs_err*.log always mentions this.<br><br>4) If I have more than one 'map' page do the following situations make a difference:<br>

  (i) have individual .jsp/.java page pairs for each map page (all the java pages have the same mapscript code, but different mapfiles)<br>  (ii) have individual .jsp pages for each map page(so two map pages would mean 2 jsp pages) but have a single java page which calls different mapfiles or different functions based on the jsp page the url request comes from.<br>

<br>I have the exact same pages running in PHP with no issue. <br><br>Any and all help is appreciated,<br>Thanks,<br>Ishwari<br><br><br>-----------------------------------   layer details from Mapfile -----------------------------------------------------------<br>

<br>#*******************************<br>#* layer definition area1     *<br>#******************************* <br>  LAYER<br>    CONNECTIONTYPE POSTGIS<br>    NAME "rspropn"<br>    CONNECTION "host=localhost user=postgres password=xxxxx dbname=xxxxx port=5432"<br>

    METADATA<br>      "DESCRIPTION" "Density by area1"<br>      "GNAME" "Thematic Maps"<br>    END<br>    GROUP Thematic<br>    <br>    DATA 'wkb_geometry FROM (select ROUND(CAST ("Seretailerpropn" as numeric),2)as seppn ,* from "gsduplarea1" AS a, "GSSummaryRetailer" as b  WHERE a."ExecutiveCode" = b."Executivecode") as test using unique ogc_fid using unique wkb_geometry using SRID=4326'<br>

<br>    STATUS OFF<br>    TYPE POLYGON<br><br>    HEADER '/ms4w/apps/xxxxxxxx/templates/area12_header.html'<br>    FOOTER '/ms4w/apps/xxxxxxxx/templates/area12_footer.html'<br><br><br>    CLASSITEM "seppn"<br>

        <br>    CLASS # CLASS 1: 0% - 0.5%<br>    NAME "0% - 0.5%"<br>    EXPRESSION ([seppn]GE 0 AND [seppn]LE 0.5)<br>    TEMPLATE '/ms4w/apps/xxxxxxxx/templates/area12_query.html'<br>      <br>    STYLE<br>

      OUTLINECOLOR 0 0 0<br>      WIDTH 10<br>        COLOR 160 208 255<br>      END<br>    <br><br>     END  <br>   <br>     CLASS # CLASS 2: 1.0% - 2.0%<br>    NAME "0.5% - 2.0%"<br>    EXPRESSION ([seppn]GT 0.5 AND [seppn]LE 2.0 )<br>

    TEMPLATE '/ms4w/apps/xxxxxxxx/templates/area12_query.html'<br>      <br>    STYLE<br>      OUTLINECOLOR 0 0 0<br>      WIDTH 10<br>        COLOR 128 160 255<br>      END<br>    <br><br>     END     <br><br>     CLASS # CLASS 3: 2.0% - 5.0%<br>

    NAME "2.0% - 5.0%"<br>    EXPRESSION ([seppn]GT 2.0 AND [seppn]LE 5.0 )<br>    TEMPLATE '/ms4w/apps/xxxxxxxx/templates/area12_query.html'<br>      <br>    STYLE<br>      OUTLINECOLOR 0 0 0<br>      WIDTH 10<br>

        COLOR 80 96 255<br>      END<br>    <br><br>     END     <br><br>     CLASS # CLASS 4: 5.0% - 25.0%<br>    NAME "5.0% - 25.0%"<br>    EXPRESSION ([seppn]GT 5.0 AND [seppn]LE 25 )<br>    TEMPLATE '/ms4w/apps/xxxxxxxx/templates/area12_query.html'<br>

      <br>    STYLE<br>      OUTLINECOLOR 0 0 0<br>      WIDTH 10<br>        COLOR 48 48 255<br>      END<br>    <br><br>     END <br>    <br>     CLASS # CLASS 5: 25% - 50%<br>    NAME "25% - 50%"<br>    EXPRESSION ([seppn]GT 25.0 AND [seppn]LE 50)<br>

    TEMPLATE '/ms4w/apps/xxxxxxxx/templates/area12_query.html'<br>      <br>    STYLE<br>      OUTLINECOLOR 0 0 0<br>      WIDTH 10<br>        COLOR 0 0 255<br>      END<br>    <br><br>     END <br>     CLASS # CLASS 6: value GE 51<br>

    NAME "50% or more"<br>    EXPRESSION ([seppn] GE 51 )<br>    TEMPLATE '/ms4w/apps/xxxxxxxx/templates/area12_query.html'<br>      <br>    STYLE<br>      OUTLINECOLOR 0 0 0<br>      WIDTH 10<br>        COLOR 0 0 255<br>

      END<br>    <br><br>     END <br><br>    METADATA<br>    wkb_geometry_type "wkb_geometry |geometry"<br>    END<br><br>   END # end layer area1<br><br><br>#*******************************<br>#* layer definition sales     *<br>

#******************************* <br>  LAYER<br>    CONNECTIONTYPE POSTGIS<br>    NAME "sales"<br>    CONNECTION "host=localhost user=postgres password=xxxxxxx dbname=GISXONTUserxxxxxxxx port=5432"<br>

    METADATA<br>      "DESCRIPTION" "% of Sales(August '08)"<br>       "GNAME" "Thematic Maps"<br>    END<br>    GROUP Thematic<br>    <br>    DATA 'wkb_geometry FROM (select ROUND(CAST (sepropn as numeric),2)as test,* from "GSExecutiveArea" AS a, "GSExecutiveMonthlySalesSummary" As b Where a."ExecutiveCode" = b.executivecode) as sesales using unique ogc_fid using unique wkb_geometry using SRID=4326'<br>

<br>    STATUS OFF<br>    TYPE POLYGON<br>    #PROCESSING "CLOSE_CONNECTION=DEFER"<br>    <br>    FILTER "intperiod =200808"<br>    <br>    HEADER '/ms4w/apps/xxxxxxxx/templates/SEArea_header.html'<br>

    FOOTER '/ms4w/apps/xxxxxxxx/templates/SEArea_footer.html'<br><br>    METADATA<br>    #query_returned_attributes '"ExecutiveCode"'<br>    wkb_geometry_type "wkb_geometry |geometry"<br>

    END<br>    <br>    DEBUG ON<br>    CLASSITEM "sepropn"<br>    #LABELITEM "executivecode"<br>    <br>    CLASS # CLASS 1: No data<br>    NAME "0% - 0.5%"<br>    EXPRESSION ([sepropn]GE 0 AND [sepropn]LT 0.5)<br>

    TEMPLATE '/ms4w/apps/xxxxxxxx/templates/SEArea_query.html'<br>      DEBUG ON<br><br>    STYLE<br>      OUTLINECOLOR 0 0 0<br>      WIDTH 10<br>        COLOR 255 255 208<br>      END<br>    <br><br>     END  <br>

   <br>     CLASS # CLASS 2: 0 - 10%<br>    NAME "0.5% - 1.0%"<br>    EXPRESSION ([sepropn]GE 0.5 AND [sepropn]LT 1.0 )<br>    TEMPLATE '/ms4w/apps/xxxxxxxx/templates/SEArea_query.html'<br>      DEBUG ON<br>

<br>    STYLE<br>      OUTLINECOLOR 0 0 0<br>      WIDTH 10<br>        COLOR 192 240 176<br>      END<br>    <br><br>     END     <br><br>     CLASS # CLASS 3: 10 LT value LE 15<br>    NAME "1.0% - 2.0%"<br>    EXPRESSION ([sepropn]GE 1.0 AND [sepropn]LT 2.0 )<br>

    TEMPLATE '/ms4w/apps/xxxxxxxx/templates/SEArea_query.html'<br>      DEBUG ON<br><br>    STYLE<br>      OUTLINECOLOR 0 0 0<br>      WIDTH 10<br>        COLOR 128 208 144<br>      END<br>    <br><br>     END     <br>

    <br>     CLASS # CLASS 4: value GE 51<br>    NAME "2.0% - 5.0%"<br>    EXPRESSION ([sepropn]GE 2.0 AND [sepropn]LT 5 )<br>    TEMPLATE '/ms4w/apps/xxxxxxxx/templates/SEArea_query.html'<br>      DEBUG ON<br>

<br>    STYLE<br>      OUTLINECOLOR 0 0 0<br>      WIDTH 10<br>        COLOR 0 160 80<br>      END<br>     END <br><br>    CLASS # CLASS 6: value GE 5<br>    NAME "5% or more"<br>    EXPRESSION ([sepropn] GE 5 )<br>

    TEMPLATE '/ms4w/apps/xxxxxxxx/templates/SEArea_query.html'<br>      DEBUG ON<br><br>    STYLE<br>      OUTLINECOLOR 0 0 0<br>      WIDTH 10<br>        COLOR 0 160 80<br>      END<br>     END <br> END # end layer SEArea<br>

<br>-----------------------------------   layer details from Mapfile -----------------------------------------------------------<div><div></div><div class="Wj3C7c"><br><br><br><br><br><br><div class="gmail_quote">On Mon, Sep 1, 2008 at 5:53 PM, Umberto Nicoletti <span dir="ltr"><<a href="mailto:umberto.nicoletti@gmail.com" target="_blank">umberto.nicoletti@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I would start by removing the ogr layers: move them to postgis or even<br>
better to shapefiles using the ogr2ogr utility.<br>
Try to have only shapefiles or postgis layers in your mapfiles and see<br>
if that helps. Disabling the ogr component is not strictly necessary<br>
(even thouh it is recommended) provided that you do not use it.<br>
<br>
Regards,<br>
<font color="#888888">Umberto<br>
</font><div><div></div><div><br>
On Mon, Sep 1, 2008 at 1:28 PM, Ishwari Sivagnanam <<a href="mailto:ishwari.s@gmail.com" target="_blank">ishwari.s@gmail.com</a>> wrote:<br>
> Given below are the specs for what I have installed on my machine. I<br>
> downloaded and installed the ms4w package with the windows installer. So I<br>
> haven't done any builds. And I haven't removed any dlls.<br>
><br>
> I added the ntwdblib.dll to the cgi-bin folder. I believe this is used to<br>
> connect SQL server and PHP. The data was originally in SQL server before I<br>
> moved it all to Postgres.<br>
><br>
> OS: Windows XP<br>
> gcc version : don't know what this is<br>
> MapServer: version 5.0.0<br>
> Java : JDK 1.6 (NetBeans IDE 5.5.1)<br>
> Java mapscript - the .dll and .jar file that are part of the ms4w package<br>
> Apache Tomcat 5.5<br>
><br>
> Other:<br>
> --------<br>
> PHP MapScript Version - ($Revision: 6872 $ $Date: 2007-09-10 10:45:30 -0400<br>
> (Mon, 10 Sep 2007) $)<br>
> ogr: i use the ogr2ogr library to call MapInfo layers<br>
><br>
> Database:<br>
> --------------<br>
> PostgreSQL 8.2.3<br>
> PostGIS 1.3.2<br>
><br>
> I read through the howto document that you pointed me to. I will check on<br>
> the connection pooling.<br>
><br>
> Unsafe components: I do use the ogr library since I have mapInfo files. I<br>
> can move them to postgis. But I don't know how to disable the components.<br>
> Since I didn't compile Java Mapscript I don't know how to fix this.<br>
><br>
> Please find attached the most recent hs_err*.log from my machine.<br>
><br>
> Thanks for your help<br>
> :-)<br>
><br>
> Ishwari<br>
><br>
> On Mon, Sep 1, 2008 at 2:51 PM, Umberto Nicoletti<br>
> <<a href="mailto:umberto.nicoletti@gmail.com" target="_blank">umberto.nicoletti@gmail.com</a>> wrote:<br>
>><br>
>> Ok, now we're getting somewhere, but I need more information.<br>
>> Read the fine manual (all of it, twice ;-)) at:<br>
>><br>
>> <a href="http://mapserver.gis.umn.edu/docs/howto/javamapscript" target="_blank">http://mapserver.gis.umn.edu/docs/howto/javamapscript</a><br>
>><br>
>> and report all the information it mentions in the last section.<br>
>> In particular I need to know if you compiled java mapscript by<br>
>> yourself or used the ms4w packages.<br>
>> Also make sure you attach the hs_err*.log files.<br>
>><br>
>> Regards,<br>
>> Umberto<br>
>><br>
>> On Mon, Sep 1, 2008 at 11:04 AM, Ishwari Sivagnanam <<a href="mailto:ishwari.s@gmail.com" target="_blank">ishwari.s@gmail.com</a>><br>
>> wrote:<br>
>> > The error message is the standard "Connection timeout" or "Unable to<br>
>> > connect" page that appears in Firefox and the 'page not available' (I<br>
>> > couldn't attach a screen capture). The platform is windows XP.<br>
>> ><br>
>> >  Ocassionally loading the application stops Tomcat completely.<br>
>> ><br>
>> > Should I send the error log ?<br>
>> ><br>
>> > Thanks,<br>
>> > Ishwari<br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> > On Mon, Sep 1, 2008 at 12:32 PM, Umberto Nicoletti<br>
>> > <<a href="mailto:umberto.nicoletti@gmail.com" target="_blank">umberto.nicoletti@gmail.com</a>> wrote:<br>
>> >><br>
>> >> Please post the exact error message and architecture you're running<br>
>> >> (version of Windows, linux, etc)?<br>
>> >><br>
>> >> Umberto<br>
>> >><br>
>> >> On Mon, Sep 1, 2008 at 7:53 AM, Ishwari Sivagnanam<br>
>> >> <<a href="mailto:ishwari.s@gmail.com" target="_blank">ishwari.s@gmail.com</a>><br>
>> >> wrote:<br>
>> >> > Hello all,<br>
>> >> > I developed a mapserver site in Java mapscript and have run into a<br>
>> >> > timeout<br>
>> >> > issue. I have tried to explain the problem as best as I can below. I<br>
>> >> > am<br>
>> >> > new<br>
>> >> > to web application development and mapserver so I apologize for<br>
>> >> > errors<br>
>> >> > in<br>
>> >> > the description.<br>
>> >> ><br>
>> >> > I have two seperate mapserver pages in my website. The scripting is<br>
>> >> > done<br>
>> >> > using Java Mapscript and JSP pages. The backend data comes from a<br>
>> >> > Postgresql/ PostGIS database. I developed the exact same application<br>
>> >> > in<br>
>> >> > PHP<br>
>> >> > and 'deployed' it. I have had no issues with that site. The Java<br>
>> >> > mapscript<br>
>> >> > was developed along the same lines as the PHP application.<br>
>> >> > Both mapserver pages share ~ 10 base maps. Additionally each of these<br>
>> >> > pages<br>
>> >> > has a set of thematic maps. Page 1 has 2 thematic maps of the same<br>
>> >> > point<br>
>> >> > layer and a third thematic layer with a summary statistic for a<br>
>> >> > polygon<br>
>> >> > layer. Page 2 has a single thematic map which displays a summary<br>
>> >> > statistic<br>
>> >> > of a polygon layer. Page 1 by itself works well. Page 2 by itself<br>
>> >> > works<br>
>> >> > well.<br>
>> >> > The problem occurs when<br>
>> >> > (a) page 1 and page 2 are merged or<br>
>> >> > (b) if they are deployed parallely in the same site<br>
>> >> > I get an message which says "Connection timed out".<br>
>> >> > I have tried searching the web for an answer but haven't been very<br>
>> >> > successful<br>
>> >> ><br>
>> >> > Version and Specs:<br>
>> >> > ----------------------------<br>
>> >> > MapServer version 5.0.0<br>
>> >> > PHP MapScript Version - ($Revision: 6872 $ $Date: 2007-09-10 10:45:30<br>
>> >> > -0400<br>
>> >> > (Mon, 10 Sep 2007) $)<br>
>> >> > PostgreSQL 8.2.3<br>
>> >> > PostGIS 1.3.2<br>
>> >> ><br>
>> >> > Apache Tomcat 5.5<br>
>> >> > Java 1.6<br>
>> >> > Java mapscript - Downloaded and installed using the page in the<br>
>> >> > mapserver.umn.. website<br>
>> >> ><br>
>> >> > Could somebody help me please?<br>
>> >> ><br>
>> >> > Ishwari<br>
>> >> ><br>
>> >> ><br>
>> >> > _______________________________________________<br>
>> >> > mapserver-users mailing list<br>
>> >> > <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
>> >> > <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
>> >> ><br>
>> >> ><br>
>> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > mapserver-users mailing list<br>
>> > <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
>> > <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
>> ><br>
>> ><br>
><br>
><br>
> _______________________________________________<br>
> mapserver-users mailing list<br>
> <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
><br>
><br>
</div></div></blockquote></div><br></div></div></div>
</div><br></div>