MapServer / MapServer-import

3 stars 2 forks source link

Apache/ArcSDE connections prevent to kill mapserv processes #2174

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: ivanopicco Date: 2007/07/25 - 14:21 In some cases, Apache does not destroy all the mapserver processes when tasks are finished. These cases always involve the ArcSDE layers, especially with 8-10 concurrent client connections, leaving orphan processes holding database connections. I perform some tests by considering different mapfiles and SDE layers. You should be able to duplicate these tests using any simple mapfile. I use Microsoft Web Strees Tool (WAST) to make the concurrent getmap requests.

This is a sample layer definition: LAYER NAME "CTR-SDE" STATUS ON DEBUG ON DATA "ctr_sde.comuni,SHAPE" TYPE POLYGON CONNECTIONTYPE SDE CONNECTION "myserv,port:5153,esri_sde,sde,sde" PROCESSING "CLOSE_CONNECTION=DEFER" TEMPLATE "template.html" METADATA "WMS_SRS" "EPSG:32632" "WMS_NAME" "Comuni_SDE" "WMS_TITLE" "Comuni_SDE" "WMS_ABSTRACT" "Comuni SDE" END CLASS STYLE OUTLINECOLOR 0 0 0 ANTIALIAS TRUE END END END

This is my mapserv -v: MapServer version 4.10.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=GEOS INPUT=EPPL7 INPUT=SDE INPUT=ORACLESPATIAL INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

I also made some tests with a simple perl mapscript instead of mapserv (see attachment). This script reports the steps of its execution on a log file. Therefore, for each script execution, I obtain a distinct log file. In this way I obtain the following log:

PID:17932 Start:2007-05-2317:05:20 Creazione mappa:2007-05-2317:05:20 Reperimento layer:2007-05-2317:05:20 Preparazione Immagine:2007-05-2317:05:20 Disegno:

After "Disegno:" the process hangs (in the script, it happened during a $layer->draw($map, $img) call).

I have post many times on ml about this problem, but I didn't have any reply. While I was waiting for helps, i've used a shell script as a CGI wrapper (see http://www.shelldorado.com/scripts/cmds/timeout) and mod_fcgid for FCGI, because they support a kind of process timeout. With these, my tests show an improvement on number of requests per second (+35%), because the timeout kills all the processes filling the Apache request stack. I think we could reach the maximun performance only when we could use a stable mapserv.

tbonfort commented 12 years ago

Author: hobu Date: 2007/08/17 - 09:06 Ivanno,

Is there any chance you can test with the 5.0 beta? I fixed a number of SDE issues that existed in the 4.10 code for this release.

Howard

tbonfort commented 12 years ago

Author: ivanopicco Date: 2007/10/12 - 13:59 Tested with 5.0. It works! Thanks

Schpidi commented 11 years ago

This is an automated comment

This issue has been closed due to lack of activity. This doesn't mean the issue is invalid, it simply got no attention within the last year. Please reopen if still valid.