<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Aptos;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#467886;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Nur Text Zchn";
        margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}
span.NurTextZchn
        {mso-style-name:"Nur Text Zchn";
        mso-style-priority:99;
        mso-style-link:"Nur Text";
        font-family:"Calibri",sans-serif;}
span.E-MailFormatvorlage20
        {mso-style-type:personal-compose;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:11.0pt;
        mso-ligatures:none;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="#467886" vlink="#96607D" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoPlainText">Hi Bas,<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">thank you so much for your quick reply.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Here are a few more details. The data source consists mostly of aerial images (compressed 100 GB for one Layer). I used map2img to compare the response time between Debian 12 - MapServer 8.0.0 and Debian 13 - MapServer 8.4.0 The response
 time was ~ identical. The raster data is embedded in the map file using a gdaltindex. This took about 200ms for both systems with default map2img BBOX. The database response time for the metadata layer was about 20ms. However, when the system is running in
 production with Apache as an FCGI process, the MapServer processes consume more and more RAM up to 2GB / normal was 300MB (MapServer 8.0). An FCGI process runs for 60 minutes by default. I then reduced this to 10 minutes so that the process would terminate
 before too many processes consumed the available memory. This means that FCGI caching isn't working optimally, so the average response time in Apache status isn't settling at around 225 ms (Fig. 1), but rather at over 400 ms. Under Debian 12, the FCGI MapServer
 processes didn't consume RAM to this extent.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText" style="margin-left:35.4pt"><span style="mso-ligatures:none"><img width="559" height="79" style="width:5.8229in;height:.8229in" id="Grafik_x0020_1" src="cid:image002.png@01DC6E9F.F96FEE70"></span><o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:35.4pt"><b>Figure 1: Apache Server Status –
</b><b><span lang="EN">average </span>245.706 ms/request<o:p></o:p></b></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">In my opinion, the problem isn't with PostgreSQL/PostGIS. Furthermore, I installed MapServer 8.6 from the backports repository and encountered the same behavior. Perhaps the issue lies with the MapServer or Apache-FCGI or GDAL-Version?<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><span lang="EN">As a result, Debian 13 with Apache FCGI and MapServer is currently not as performant as the previous version.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN"><o:p> </o:p></span></p>
<p class="MsoPlainText">I could also try installing MapServer version 8.4.0 from the backports on Debian 12 to test how this variant behaves.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Best regards, <o:p></o:p></p>
<p class="MsoPlainText">Steffen<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Quelle:<o:p></o:p></p>
<p class="MsoPlainText">MapServer<o:p></o:p></p>
<p class="MsoPlainText"><a href="https://packages.debian.org/source/bookworm/mapserver">https://packages.debian.org/source/bookworm/mapserver</a> (8.0.0)<o:p></o:p></p>
<p class="MsoPlainText"><a href="https://packages.debian.org/source/trixie/mapserver">https://packages.debian.org/source/trixie/mapserver</a> (8.4.0)<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Apache2<o:p></o:p></p>
<p class="MsoPlainText"><a href="https://packages.debian.org/bookworm/apache2">https://packages.debian.org/bookworm/apache2</a> (2.4.65-1~deb12u1)<o:p></o:p></p>
<p class="MsoPlainText"><a href="https://packages.debian.org/trixie/apache2">https://packages.debian.org/trixie/apache2</a>  (2.4.65-2)<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">FCGI<o:p></o:p></p>
<p class="MsoPlainText"><a href="https://packages.debian.org/bookworm/libapache2-mod-fcgid">https://packages.debian.org/bookworm/libapache2-mod-fcgid</a> (2.3.9)<o:p></o:p></p>
<p class="MsoPlainText"><a href="https://packages.debian.org/trixie/libapache2-mod-fcgid">https://packages.debian.org/trixie/libapache2-mod-fcgid</a> (2.3.9)<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">GDAL<o:p></o:p></p>
<p class="MsoPlainText"><a href="https://packages.debian.org/bookworm/gdal-bin">https://packages.debian.org/bookworm/gdal-bin</a> (3.6.2+dfsg-1)<o:p></o:p></p>
<p class="MsoPlainText"><a href="https://packages.debian.org/trixie/gdal-bin">https://packages.debian.org/trixie/gdal-bin</a> (3.10.3+dfsg-1)<o:p></o:p></p>
<p class="MsoPlainText"><b><o:p> </o:p></b></p>
<p class="MsoPlainText">Posgtres<o:p></o:p></p>
<p class="MsoPlainText"><a href="https://packages.debian.org/bookworm/postgresql-15-postgis-3">https://packages.debian.org/bookworm/postgresql-15-postgis-3</a> (PG 15 – PostGIS 3.3.2)<o:p></o:p></p>
<p class="MsoPlainText"><a href="https://packages.debian.org/trixie/postgresql-17-postgis-3">https://packages.debian.org/trixie/postgresql-17-postgis-3</a> ( PG 17 – PostGIS 3.5.2)<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><span style="mso-fareast-language:DE">-----Ursprüngliche Nachricht-----<br>
Von: Sebastiaan Couwenberg <sebastic@xs4all.nl> <br>
Gesendet: Dienstag, 16. Dezember 2025 13:58<br>
An: Neubauer, Steffen (VermKV) <steffen.neubauer@vermkv.rlp.de>; pkg-grass-devel@lists.alioth.debian.org<br>
Betreff: Re: Debian 13 - Apache - FCGI - cgi-mapserver</span><o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">On 12/16/25 1:15 PM, Neubauer, Steffen (VermKV) via Pkg-grass-devel wrote:<o:p></o:p></p>
<p class="MsoPlainText">> this week I performed a server migration from Debian 12 to Debian 13 using the Apache2 and MapServer packages.<o:p></o:p></p>
<p class="MsoPlainText">> Unfortunately, the MapServer behavior wasn't identical in the same configuration.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">You upgraded from 8.0.0 to 8.4.0, that's not unexpected.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Nothing on the migration guide springs out, though:<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">  https://mapserver.org/MIGRATION_GUIDE.html#mapserver-8-0-to-8-2-migration<o:p></o:p></p>
<p class="MsoPlainText">  https://mapserver.org/MIGRATION_GUIDE.html#mapserver-8-2-to-8-4-migration<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">> The single MapServer FCGI processes<o:p></o:p></p>
<p class="MsoPlainText">> were using 15% of the RAM instead of the previous 1.5%. This caused
<o:p></o:p></p>
<p class="MsoPlainText">> the VM's RAM to overflow. Even changing the Apache FCGI parameters
<o:p></o:p></p>
<p class="MsoPlainText">> didn't improve the situation. Additionally, the response time of the WMS request was about 200ms slower because the FCGI performance couldn't be achieved.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">I'm using MapServer via MapScript and the system in question has plenty of RAM, so I don't have any relevant experience.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">The response time can be influenced by changes other than MapServer, prime suspect is the data source.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">PostGIS and PostgreSQL had many changes between bookworm and trixie as well, the PostGIS selectivity has a regression in 3.5 for example:<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">  https://lists.osgeo.org/pipermail/postgis-users/2025-September/046864.html<o:p></o:p></p>
<p class="MsoPlainText">  https://trac.osgeo.org/postgis/ticket/5984<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">> Is there a known memory leak in the Debian 13 Apache2-FCGI-MapServer configuration?<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Nothing in the Debian BTS, you'll have better luck asking other MapServer users:<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">  https://mapserver.org/community/lists.html#mapserver-users<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Kind Regards,<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Bas<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">--<o:p></o:p></p>
<p class="MsoPlainText">  PGP Key ID: 4096R/6750F10AE88D4AF1<o:p></o:p></p>
<p class="MsoPlainText">Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1<o:p></o:p></p>
</div>
</body>
</html>