#2174 closed defect (fixed)
Apache/ArcSDE connections prevent to kill mapserv processes
Reported by: | ivanopicco | Owned by: | hobu |
---|---|---|---|
Priority: | high | Milestone: | 5.0 release |
Component: | MapServer CGI | Version: | 4.10 |
Severity: | critical | Keywords: | |
Cc: |
Description
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.
Attachments (1)
Change History (5)
by , 17 years ago
Attachment: | my_mapserv_wms.pl added |
---|
comment:1 by , 17 years ago
Component: | AGG → MapServer CGI |
---|
comment:2 by , 17 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Tested with 5.0. It works! Thanks
comment:4 by , 17 years ago
Milestone: | FUTURE → 5.0 release |
---|
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