Yet another reason to put a wrapper around you mapserv binary.
I have hundreds of layers and block GetCapabilities outright and return
a proper warning stating such.
Obviously, this is not a solution for everyone. Adding this, some
security traps and whatever else you need to your wrapper is really
beneficial.
On 12/20/22 11:33, Kralidis,Tom (ECCC) wrote:
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).
Feel free to open an issue if this could be helpful/is of interest.
Thanks
..Tom
*From:* MapServer-users <[email protected]> *On
Behalf Of *Oskar Ravhed
*Sent:* Tuesday, December 20, 2022 10:01
*To:* Rahkonen Jukka <[email protected]>; Marcin
Niemyjski <[email protected]>; [email protected]
*Subject:* Re: [MapServer-users] Failed to download
capabilities:Download of capabilities failed: Connection on mapfile with
more than 1000 layers
You don't often get email from [email protected]
<mailto:[email protected]>. Learn why this is important
<https://aka.ms/LearnAboutSenderIdentification>
Hi it took 40 s
Merry Christmas
On 20/12/2022 15:38, Rahkonen Jukka wrote:
Hi,
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
https://www.mapserver.org/ogc/wms_server.html
<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>
but how much faster it is depends on the data source.
I think that instead of 1200 layers you could have just one time
enabled layer https://www.mapserver.org/ogc/wms_time.html
<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>.
-Jukka Rahkonen-
*Lähettäjä:* MapServer-users
<[email protected]>
<mailto:[email protected]> *Puolesta *Marcin
Niemyjski via MapServer-users
*Lähetetty:* tiistai 20. joulukuuta 2022 16.18
*Vastaanottaja:* Oskar Ravhed <[email protected]>
<mailto:[email protected]>; [email protected]
<mailto:[email protected]>
*Aihe:* Re: [MapServer-users] Failed to download
capabilities:Download of capabilities failed: Connection on mapfile
with more than 1000 layers
Great advice, thank you Oskar.
Could you tell me how long it takes to load the WMS into qgis or
GetCap with that many layers?
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.
Merry Christmas to all,
Marcin
------------------------------------------------------------------------
*From:*MapServer-users <[email protected]
<mailto:[email protected]>> on behalf of Oskar
Ravhed <[email protected] <mailto:[email protected]>>
*Sent:* Tuesday, December 20, 2022 1:08 PM
*To:* [email protected]
<mailto:[email protected]>
<[email protected]
<mailto:[email protected]>>
*Subject:* Re: [MapServer-users] Failed to download
capabilities:Download of capabilities failed: Connection on mapfile
with more than 1000 layers
Hello!
I have 3234 layers in a service and it works fine. also works fine with
10.000 layers
1 try the getcap in browser
2a if step 1 is success change network timeout in qgis
2b if step 1 does not work change timeouts on server and check
mapserver
log
On 20/12/2022 09:59, Jörg Thomsen (WhereGroup) wrote:
> Hi,
>
> funny, how you type twelve.
>
> 1200 are very much and I guess no one has tried this before.
> So to your question: I would say yes.
>
> I suggest to split it into several services / mapfiles. The
> capability-xml ist very big I think and most clients will habe
> problems with it. The usability is bad, the users have to scroll
> through 1200 Layers, puh. And I don't know whether a getMap with
> http-get will work (is there a current length-limit in http-get?).
>
>
> Jörg
>
>
> Am 20.12.22 um 09:42 schrieb Marcin Niemyjski via MapServer-users:
>> Hello,
>>
>> I have a mapfile which constist of 1200 layers. While loading to
qgis
>> error "Failed to download capabilities:Download of capabilities
>> failed: Connection" is recived.
>>
>> Does this happen becaues of quantitu of layers in mapfile? Is there
>> any workaround?
>>
>> Best,
>> Marcin
>>
>> _______________________________________________
>> MapServer-users mailing list
>> [email protected]
<mailto:[email protected]>
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
<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>
>
_______________________________________________
MapServer-users mailing list
[email protected] <mailto:[email protected]>
https://lists.osgeo.org/mailman/listinfo/mapserver-users
<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>
_______________________________________________
MapServer-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
MapServer-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/mapserver-users