<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)">
<!--[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:wf_segoe-ui_normal;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        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;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        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.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle20
        {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-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Option: we could consider adding a mapfile directive to point to a GetCapabilities file (oh disk), which can act as an early out (instead of generating Capabilities XML on the fly).  We would want to test how
 effective this would be for larger mapfiles (i.e. reading mapfile vs. rendering Capabilities XML).<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">Feel free to open an issue if this could be helpful/is of interest.<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">Thanks<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">..Tom<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"><o:p> </o:p></span></p>
<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>From:</b> MapServer-users <mapserver-users-bounces@lists.osgeo.org>
<b>On Behalf Of </b>Oskar Ravhed<br>
<b>Sent:</b> Tuesday, December 20, 2022 10:01<br>
<b>To:</b> Rahkonen Jukka <jukka.rahkonen@maanmittauslaitos.fi>; Marcin Niemyjski <mniemyjski@cloudferro.com>; mapserver-users@lists.osgeo.org<br>
<b>Subject:</b> Re: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" align="left" width="100%" style="width:100.0%">
<tbody>
<tr>
<td style="background:#A6A6A6;padding:5.25pt 1.5pt 5.25pt 1.5pt"></td>
<td width="100%" style="width:100.0%;background:#EAEAEA;padding:5.25pt 3.75pt 5.25pt 11.25pt;word-wrap:break-word">
<div>
<p class="MsoNormal" style="mso-element:frame;mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly">
<span style="font-size:9.0pt;font-family:wf_segoe-ui_normal;color:#212121">You don't often get email from
<a href="mailto:oskar.ravhed@t-kartor.com">oskar.ravhed@t-kartor.com</a>. <a href="https://aka.ms/LearnAboutSenderIdentification">
Learn why this is important</a><o:p></o:p></span></p>
</div>
</td>
<td width="10" style="width:56.25pt;background:#EAEAEA;padding:5.25pt 3.75pt 5.25pt 3.75pt;word-wrap:break-word;align:left">
</td>
</tr>
</tbody>
</table>
<div>
<p>Hi it took 40 s  <o:p></o:p></p>
<p><o:p> </o:p></p>
<p>Merry Christmas<o:p></o:p></p>
<div>
<p class="MsoNormal">On 20/12/2022 15:38, Rahkonen Jukka wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">The time is not a constant (number of layers * x milliseconds). For example, it is faster to generate the layer BoundingBox into GetCapabilities if the wms_extent metadata is set for the layer
<a href="https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.mapserver.org%2Fogc%2Fwms_server.html&data=05%7C01%7CTom.Kralidis%40ec.gc.ca%7C58416ade2edc4ef4f60d08dae29b0d3b%7C740c5fd36e8b41769cc9454dbe4e62c4%7C0%7C0%7C638071454009300660%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=lKZE3%2F%2Bg5NpBH%2BoGyk%2BMy9CXLdtFWjKPqcAye61n2qw%3D&reserved=0">
https://www.mapserver.org/ogc/wms_server.html</a> but how much faster it is depends on the data source.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I think that instead of 1200 layers you could have just one time enabled layer
<a href="https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.mapserver.org%2Fogc%2Fwms_time.html&data=05%7C01%7CTom.Kralidis%40ec.gc.ca%7C58416ade2edc4ef4f60d08dae29b0d3b%7C740c5fd36e8b41769cc9454dbe4e62c4%7C0%7C0%7C638071454009300660%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=1CtW%2BMfLBUq3DtOZ%2FTX9PzoNjSjgETQ4FDBJ3uRg9kQ%3D&reserved=0">
https://www.mapserver.org/ogc/wms_time.html</a>.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">-Jukka Rahkonen-<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>Lähettäjä:</b> MapServer-users <a href="mailto:mapserver-users-bounces@lists.osgeo.org">
<mapserver-users-bounces@lists.osgeo.org></a> <b>Puolesta </b>Marcin Niemyjski via MapServer-users<br>
<b>Lähetetty:</b> tiistai 20. joulukuuta 2022 16.18<br>
<b>Vastaanottaja:</b> Oskar Ravhed <a href="mailto:oskar.ravhed@t-kartor.com"><oskar.ravhed@t-kartor.com></a>;
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<b>Aihe:</b> Re: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"> </span><o:p></o:p></p>
</div>
<p class="MsoNormal">Great advice, thank you Oskar. <o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Could you tell me how long it takes to load the WMS into qgis or GetCap with that many layers?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">I am also interested in what purpose you are using the WMS with this amount of data. Could you share it? In my case it is daily Sentinel-1 imagery for the whole world from
 the beginning of 2021.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Merry Christmas to all,<o:p></o:p></p>
</div>
<p class="MsoNormal">Marcin <o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> MapServer-users <<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>> on behalf of Oskar Ravhed <<a href="mailto:oskar.ravhed@t-kartor.com">oskar.ravhed@t-kartor.com</a>><br>
<b>Sent:</b> Tuesday, December 20, 2022 1:08 PM<br>
<b>To:</b> <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a> <<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>><br>
<b>Subject:</b> Re: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers</span>
<o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">Hello!<br>
<br>
I have 3234 layers in a service and it works fine. also works fine with <br>
10.000 layers<br>
<br>
1 try the getcap in browser<br>
2a if step 1 is success change network timeout in qgis<br>
2b if step 1 does not work change timeouts on server and check mapserver <br>
log<br>
<br>
On 20/12/2022 09:59, Jörg Thomsen (WhereGroup) wrote:<br>
> Hi,<br>
><br>
> funny, how you type twelve.<br>
><br>
> 1200 are very much and I guess no one has tried this before.<br>
> So to your question: I would say yes.<br>
><br>
> I suggest to split it into several services / mapfiles. The <br>
> capability-xml ist very big I think and most clients will habe <br>
> problems with it. The usability is bad, the users have to scroll <br>
> through 1200 Layers, puh. And I don't know whether a getMap with <br>
> http-get will work (is there a current length-limit in http-get?).<br>
><br>
><br>
> Jörg<br>
><br>
><br>
>  Am 20.12.22 um 09:42 schrieb Marcin Niemyjski via MapServer-users:<br>
>> Hello,<br>
>><br>
>> I have a mapfile which constist of 1200 layers. While loading to qgis <br>
>> error "Failed to download capabilities:Download of capabilities <br>
>> failed: Connection" is recived.<br>
>><br>
>> Does this happen becaues of quantitu of layers in mapfile? Is there <br>
>> any workaround?<br>
>><br>
>> Best,<br>
>> Marcin<br>
>><br>
>> _______________________________________________<br>
>> MapServer-users mailing list<br>
>> <a href="mailto:MapServer-users@lists.osgeo.org">MapServer-users@lists.osgeo.org</a><br>
>> <a href="https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fmapserver-users&data=05%7C01%7CTom.Kralidis%40ec.gc.ca%7C58416ade2edc4ef4f60d08dae29b0d3b%7C740c5fd36e8b41769cc9454dbe4e62c4%7C0%7C0%7C638071454009300660%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=UmyXdb30gN1%2FNEvpoBqsr1SwAWBYK3p6VyoMNcgzyKo%3D&reserved=0">
https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
><br>
<br>
_______________________________________________<br>
MapServer-users mailing list<br>
<a href="mailto:MapServer-users@lists.osgeo.org">MapServer-users@lists.osgeo.org</a><br>
<a href="https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fmapserver-users&data=05%7C01%7CTom.Kralidis%40ec.gc.ca%7C58416ade2edc4ef4f60d08dae29b0d3b%7C740c5fd36e8b41769cc9454dbe4e62c4%7C0%7C0%7C638071454009300660%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=UmyXdb30gN1%2FNEvpoBqsr1SwAWBYK3p6VyoMNcgzyKo%3D&reserved=0">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><o:p></o:p></p>
</div>
</div>
</blockquote>
<p><o:p> </o:p></p>
</div>
</div>
</body>
</html>