Can similar, nearly simultaenous requests disturb mapserver?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Can similar, nearly simultaenous requests disturb mapserver?

Michael Schulz
Hi all,

I have a slightly strange problem and would like some thoughts of the experts.

I have a mapfile, that serves one layer that is connected to a wfs
datasource (aka wfs client layer) as a wms layer. I have the problem
that when doing two similar requests at nearly the same time, very
often one request throws an error. Interestingly not always the same.
In descending number of appearances:

- "msDrawMap(): Image handling error. Failed to draw layer named  ...
msWFSLayerWhichShapes(): WFS connection error. WFS request produced no
oputput for layer".
- "msOGRLayerInitItemInfo(): OGR error. Invalid Field name: TYPE"
- "msOGRFileNextShape(): OGR error. XML Parsing Error: The input ended
before all started tags were ended. Last tag started was
'gml:coordinates'"

The other request is always drawn correctly. To me it seems as if the
downloaded gml-File is somehow shared between both requests, only
allowing the "first" request to parse it correctly and to draw a map.

I have reproduced this error with several mapserver versions, ranging
from 5.2 up to 5.6.

Thanks for any thoughts, Michael


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Aufwind durch Wissen!

Qualifizierte Open Source Schulungen bei der
http://www.foss-academy.eu/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-----------------------------------------------------------
Michael Schulz
[hidden email]

in medias res
Gesellschaft für Informationstechnologie mbH

Schwimmbadstraße 2
D-79100  Freiburg i. Br.

Tel:  +49 (0)761 705798-102
Tel:  +49 (0)761 705798-0
Fax: +49 (0)761 705798-09

http://www.webgis.de / http://www.zopecms.de
--------------------------------------------------------------
Geschäftsführer: Stefan Giese, Dr. Christof Lindenbeck
Eingetragen im Handelsregister HRB 5930 beim Amtsgericht Freiburg
_______________________________________________
mapserver-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Can similar, nearly simultaenous requests disturb mapserver?

christopher.schmidt

On Jun 25, 2010, at 10:14 AM, ext Michael Schulz wrote:

> Hi all,
>
> I have a slightly strange problem and would like some thoughts of the experts.
>
> I have a mapfile, that serves one layer that is connected to a wfs
> datasource (aka wfs client layer) as a wms layer. I have the problem
> that when doing two similar requests at nearly the same time, very
> often one request throws an error. Interestingly not always the same.
> In descending number of appearances:
>
> - "msDrawMap(): Image handling error. Failed to draw layer named  ...
> msWFSLayerWhichShapes(): WFS connection error. WFS request produced no
> oputput for layer".
> - "msOGRLayerInitItemInfo(): OGR error. Invalid Field name: TYPE"
> - "msOGRFileNextShape(): OGR error. XML Parsing Error: The input ended
> before all started tags were ended. Last tag started was
> 'gml:coordinates'"
>
> The other request is always drawn correctly. To me it seems as if the
> downloaded gml-File is somehow shared between both requests, only
> allowing the "first" request to parse it correctly and to draw a map.
>
> I have reproduced this error with several mapserver versions, ranging
> from 5.2 up to 5.6.

You didn't mention how you have MapServer configured; is it as a CGI,
via FastCGI, something else? In general, running mapserver + GDAL in a
threaded environment may have some side effects, depending on how you're
using them, so if you're using FastCGI + threads somehow, that could be
bad.

If you're not doing this, then I would argue this really sounds like a
problem on the server you're connecting to; you might want to get a
packet dump of the outgoing HTTP requests during this time, and see
if you can determine what the server is returning. If you've been
using the same backend server, the problem may well not be
MapServer.

Regards,
--
Christopher Schmidt
Nokia

_______________________________________________
mapserver-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Can similar, nearly simultaenous requests disturb mapserver?

Michael Schulz
Hi,

thanks for the response, see inline ...

2010/6/25  <[hidden email]>:

>
> On Jun 25, 2010, at 10:14 AM, ext Michael Schulz wrote:
>
>> Hi all,
>>
>> I have a slightly strange problem and would like some thoughts of the experts.
>>
>> I have a mapfile, that serves one layer that is connected to a wfs
>> datasource (aka wfs client layer) as a wms layer. I have the problem
>> that when doing two similar requests at nearly the same time, very
>> often one request throws an error. Interestingly not always the same.
>> In descending number of appearances:
>>
>> - "msDrawMap(): Image handling error. Failed to draw layer named  ...
>> msWFSLayerWhichShapes(): WFS connection error. WFS request produced no
>> oputput for layer".
>> - "msOGRLayerInitItemInfo(): OGR error. Invalid Field name: TYPE"
>> - "msOGRFileNextShape(): OGR error. XML Parsing Error: The input ended
>> before all started tags were ended. Last tag started was
>> 'gml:coordinates'"
>>
>> The other request is always drawn correctly. To me it seems as if the
>> downloaded gml-File is somehow shared between both requests, only
>> allowing the "first" request to parse it correctly and to draw a map.
>>
>> I have reproduced this error with several mapserver versions, ranging
>> from 5.2 up to 5.6.
>
> You didn't mention how you have MapServer configured; is it as a CGI,
> via FastCGI, something else? In general, running mapserver + GDAL in a
> threaded environment may have some side effects, depending on how you're
> using them, so if you're using FastCGI + threads somehow, that could be
> bad.

sorry, I forgot that. I'm using plain mapserver cgi on a linux/debian system.

> If you're not doing this, then I would argue this really sounds like a
> problem on the server you're connecting to; you might want to get a
> packet dump of the outgoing HTTP requests during this time, and see
> if you can determine what the server is returning. If you've been
> using the same backend server, the problem may well not be
> MapServer.

That is an interesting thought. I'll try to examine the returned
packets from the remote wfs server. However, I have several
installations on various servers, with exactly the same setup (well,
running in vm's on different hosts, but the guest system is identical)
and I think the problem is only occurring on "slower" machines.

But thanks, for this pointer. I'll check that.

Cheers, Michael



--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Aufwind durch Wissen!

Qualifizierte Open Source Schulungen bei der
http://www.foss-academy.eu/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-----------------------------------------------------------
Michael Schulz
[hidden email]

in medias res
Gesellschaft für Informationstechnologie mbH

Schwimmbadstraße 2
D-79100  Freiburg i. Br.

Tel:  +49 (0)761 705798-102
Tel:  +49 (0)761 705798-0
Fax: +49 (0)761 705798-09

http://www.webgis.de / http://www.zopecms.de
--------------------------------------------------------------
Geschäftsführer: Stefan Giese, Dr. Christof Lindenbeck
Eingetragen im Handelsregister HRB 5930 beim Amtsgericht Freiburg
_______________________________________________
mapserver-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Can similar, nearly simultaenous requests disturb mapserver?

Daniel Morissette
In reply to this post by Michael Schulz
Michael Schulz wrote:
>
> The other request is always drawn correctly. To me it seems as if the
> downloaded gml-File is somehow shared between both requests, only
> allowing the "first" request to parse it correctly and to draw a map.
>

That's what the problem was: the same GML filename was used for both
requests. This was reported and fixed a few months ago in the current
dev/trunk version, and I just backported the fix to the 5.6 branch so
that it will be included in the 5.6.4 release (hopefully soon).

You could easily build a new mapserv binary with the fix, see:

  http://trac.osgeo.org/mapserver/ticket/3137

Daniel
--
Daniel Morissette
http://www.mapgears.com/
_______________________________________________
mapserver-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Can similar, nearly simultaenous requests disturb mapserver?

Michael Schulz
Hi Daniel,

thx for your information. Don't how I missed that ticket ... it
accurately described my own problem.
I'll try building a patched version.

Thanks a lot. Cheers, Michael


2010/6/29 Daniel Morissette <[hidden email]>:

> Michael Schulz wrote:
>>
>> The other request is always drawn correctly. To me it seems as if the
>> downloaded gml-File is somehow shared between both requests, only
>> allowing the "first" request to parse it correctly and to draw a map.
>>
>
> That's what the problem was: the same GML filename was used for both
> requests. This was reported and fixed a few months ago in the current
> dev/trunk version, and I just backported the fix to the 5.6 branch so
> that it will be included in the 5.6.4 release (hopefully soon).
>
> You could easily build a new mapserv binary with the fix, see:
>
>  http://trac.osgeo.org/mapserver/ticket/3137
>
> Daniel
> --
> Daniel Morissette
> http://www.mapgears.com/
> _______________________________________________
> mapserver-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Aufwind durch Wissen!

Qualifizierte Open Source Schulungen bei der
http://www.foss-academy.eu/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-----------------------------------------------------------
Michael Schulz
[hidden email]

in medias res
Gesellschaft für Informationstechnologie mbH

Schwimmbadstraße 2
D-79100  Freiburg i. Br.

Tel:  +49 (0)761 705798-102
Tel:  +49 (0)761 705798-0
Fax: +49 (0)761 705798-09

http://www.webgis.de / http://www.zopecms.de
--------------------------------------------------------------
Geschäftsführer: Stefan Giese, Dr. Christof Lindenbeck
Eingetragen im Handelsregister HRB 5930 beim Amtsgericht Freiburg
_______________________________________________
mapserver-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapserver-users