[mapserver-users] cgi-error: End of script output before headers mapserv

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Fri Jan 24 00:49:15 PST 2020


Did you make the test that I suggested to run the same request for individual layers instead of the root layer “default”?

-Jukka-

Lähettäjä: mapserver-users <mapserver-users-bounces at lists.osgeo.org> Puolesta Johannes Paul
Lähetetty: torstai 23. tammikuuta 2020 21.56
Vastaanottaja: Brian <mulcahy.brianp at gmail.com>
Kopio: mapserver-users at lists.osgeo.org
Aihe: Re: [mapserver-users] cgi-error: End of script output before headers mapserv

Hi Brian,
I'm not usinage fcgi on my side, and it is not related to file permission or bad cgi script.
I've tried to work on my Osm postgis tables, and made the geom valid, like Jukka said, but it didn't change anything...
I'm thinking it might be related with Apache MPM prefork module and the MaxRequestWorker ?
Keep in touch


Le jeu. 23 janv. 2020 à 20:27, Brian <mulcahy.brianp at gmail.com<mailto:mulcahy.brianp at gmail.com>> a écrit :
So I have this error as well. I mostly see it when a connection times out. Like you mapserver shows no errors but apache has the script ended before headers error. Do you have fcgi enabled? If I disable fcgi I don't get that error, so It could be related to connection a user has to mapserver. Maybe FcgidMaxRequestsPerProcess, FcgidMinProcessesPerClass, FcgidMaxProcessesPerClass  need to be tweaked?

If you do a google search on this error most of the responses says it is either due to a bad cgi script or bad file/dir permissions which in our case I doubt that is the reason. If you figure it out let me know.

On Wed, Jan 22, 2020 at 12:31 PM Rahkonen Jukka (MML) <jukka.rahkonen at maanmittauslaitos.fi<mailto:jukka.rahkonen at maanmittauslaitos.fi>> wrote:
Hi,

I would suspect data, especially because it seems to be OSM data. Perhaps some invalid polygon again.

You use &layers=default and I suppose that it means all the layers from your mapfile together. In that case I would try to catch the failing layer by adding layers one by one and in groups (first &layers=layer1, then &layers=layer2, then &layers=layer1,layer2).

Hopefully that way you can find the failing layer, and then because you know the BBOX you may find the nasty geometry from the database. Without your data and mapfile it is rather useless to make very much guesswork, but a small change in bbox may select/not select a bad geometry, of change of bbox may change scale so much that source data come from a different table if you have a scale dependent layer group in the mapfile etc.

If the issue is due to bad geometry and you use PostGIS you may find it with ST_IsValid and ST_IsValidReason, and correct with ST_MakeValid.

-Jukka Rahkonen-

Lähettäjä: mapserver-users <mapserver-users-bounces at lists.osgeo.org<mailto:mapserver-users-bounces at lists.osgeo.org>> Puolesta Johannes Paul
Lähetetty: keskiviikko 22. tammikuuta 2020 13.02
Vastaanottaja: mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
Aihe: [mapserver-users] cgi-error: End of script output before headers mapserv

Hello,
my mapserver is having a very strange behaviour, which I can't explain, nor debug.
I'm using mapserver 7.0.0 along with apache http server 2.4.6.

Most of the time, the server is working just fine, i.e. when I request a typical URL, I get my image back:

http://10.0.0.22/cgi-bin/mapserv?map=/var/www/html/osm-transp-en-default.map&VERSION=1.1.0&REQUEST=getmap&SERVICE=wms&STYLES=&BBOX=-9.143,38.746,-9.140,38.748&HEIGHT=256&WIDTH=256&LAYERS=default&FORMAT=image/png&SRS=EPSG:4326&TRANSPARENT=true

but then, when I slightly change bbox values, I get an internal server error (500):

http://10.0.0.22/cgi-bin/mapserv?map=/var/www/html/osm-transp-en-default.map&VERSION=1.1.0&REQUEST=getmap&SERVICE=wms&STYLES=&BBOX=-9.1433,38.7460,-9.1406,38.7487&HEIGHT=256&WIDTH=256&LAYERS=default&FORMAT=image/png&SRS=EPSG:4326&TRANSPARENT=true

I don't get any mapserver error log, but I do get an apache error log saying:
[cgi:error] End of script output before headers: mapserv

This is really an strange behaviour which I can't explain.
Did anyone already experienced a similar situation ?
Thanks
Jo
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20200124/c92720ab/attachment.html>


More information about the mapserver-users mailing list