<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=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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="EN-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p style="line-height:18.0pt;background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#3E4349">Well, for what I can read in the documentation of mapserver:<o:p></o:p></span></p>
<p style="line-height:18.0pt;background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#3E4349"><a href="https://mapserver.org/optimization/fastcgi.html">https://mapserver.org/optimization/fastcgi.html</a><o:p></o:p></span></p>
<p style="line-height:18.0pt;background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#3E4349">FastCGI is a protocol for keeping cgi-bin style web applications running as a daemon to take advantage of preserving memory caches, and
amortizing other high startup costs (like heavy database connections) over many requests.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">It seems that using mapcache as fastCGI over apache modules it that should improve speed also.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-GB">Sebastiano Laini<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-GB">Web Developer<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-GB">Buchanan Computing<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:EN-GB">From:</span></b><span lang="EN-US" style="mso-fareast-language:EN-GB"> Rahkonen Jukka (MML) [mailto:jukka.rahkonen@maanmittauslaitos.fi]
<br>
<b>Sent:</b> 17 October 2018 12:30<br>
<b>To:</b> Sebastiano Laini <Sebastiano.Laini@BuchananComputing.co.uk>; 'mapserver-users@lists.osgeo.org' <mapserver-users@lists.osgeo.org><br>
<b>Subject:</b> Re: mapcache fastcgi<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="FI" style="color:#1F497D">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FI" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Could you explain your plan with some more details? What I have understood is that you have experienced that SQLite cache is slower than disk cache in your environment.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">What I do not understand is what you are going to reach by running Mapcache as fastcgi instead of running it as Apache module which should be the faster option, and if this has some connection with
the SQLite cache vs. disk cache comparison. Do you guess that fastcgi woud make SQLite cache faster?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">-Jukka Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="FI" style="mso-fareast-language:FI">Lähettäjä:</span></b><span lang="FI" style="mso-fareast-language:FI"> mapserver-users [<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mailto:mapserver-users-bounces@lists.osgeo.org</a>]
<b>Puolesta </b>Sebastiano Laini<br>
<b>Lähetetty:</b> 17. lokakuuta 2018 12:16<br>
<b>Vastaanottaja:</b> 'mapserver-users@lists.osgeo.org' <<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>><br>
<b>Aihe:</b> [mapserver-users] mapcache fastcgi<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="FI"><o:p> </o:p></span></p>
<p class="MsoNormal">Hi all,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In the end I tried MapCache with sqlite3 cache but it’s very slow compared with the disk cache, so I want to setup MapCache with fastCGI on CentOS 7.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I don’t understand what I need to install as the fastCGI link in the documentation is broken and I don’t know if is up to date.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I already have apache fgcid installed from default in the httpd folder and I use PHP in fastCGI in all the domains, so I’m sure that fastCGI it works, though, I still need the fastCGI library? How can I install it in CentOS 7?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In my apache conf I’ve already added the lines to load the mapcache module and the mapcache.xml file<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">LoadModule mapcache_module modules/mod_mapcache.so<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><IfModule mapcache_module><o:p></o:p></p>
<p class="MsoNormal"> <Directory /path/to/directory><o:p></o:p></p>
<p class="MsoNormal"> Require all granted<o:p></o:p></p>
<p class="MsoNormal"> </Directory><o:p></o:p></p>
<p class="MsoNormal"> MapCacheAlias /mapcache "/path/to/directory/mapcache.xml"<o:p></o:p></p>
<p class="MsoNormal"></IfModule><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I need to leave the previous configuration and add these new lines in the conf files?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">FcgidInitialEnv "MAPCACHE_CONFIG_FILE" "/path/to/mapcache/mapcache.xml<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><IfModule mod_fcgid.c><o:p></o:p></p>
<p class="MsoNormal"> IPCCommTimeout 120<o:p></o:p></p>
<p class="MsoNormal"> MaxProcessCount 10<o:p></o:p></p>
<p class="MsoNormal"> FcgidInitialEnv "MAPCACHE_CONFIG_FILE" "/path/to/mapcache/mapcache.xml"<o:p></o:p></p>
<p class="MsoNormal"> <Location /map.fcgi><o:p></o:p></p>
<p class="MsoNormal"> Order Allow,Deny<o:p></o:p></p>
<p class="MsoNormal"> Allow from all<o:p></o:p></p>
<p class="MsoNormal"> SetHandler fcgid-script<o:p></o:p></p>
<p class="MsoNormal"> </Location><o:p></o:p></p>
<p class="MsoNormal"> ScriptAlias /map.fcgi "/path/to/mapcache/src/mapcache"<o:p></o:p></p>
<p class="MsoNormal"></IfModule><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">And then instead of <a href="http://myserver/mapcache">http://myserver/mapcache</a> I need to use
<a href="http://myserver/fcgi-bin">http://myserver/fcgi-bin</a> to access mapcache fcgi?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-GB">Sebastiano Laini<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-GB">Web Developer<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-GB">Buchanan Computing<o:p></o:p></span></p>
</div>
</body>
</html>