[mapserver-users] . RE: Overriding MapServer Map File "DATA" parameter

Asad Ullah Asad.Ullah at sigmaspace.com
Tue Mar 29 12:28:16 PDT 2011


Tried the solution below #1 but did not work. More suggestion please!

Asad 


-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of mapserver-users-request at lists.osgeo.org
Sent: Tuesday, March 29, 2011 12:38 PM
To: mapserver-users at lists.osgeo.org
Subject: mapserver-users Digest, Vol 38, Issue 57

Send mapserver-users mailing list submissions to
	mapserver-users at lists.osgeo.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.osgeo.org/mailman/listinfo/mapserver-users
or, via email, send a message with subject or body 'help' to
	mapserver-users-request at lists.osgeo.org

You can reach the person managing the list at
	mapserver-users-owner at lists.osgeo.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of mapserver-users digest..."


Today's Topics:

   1. RE: Overriding MapServer Map File "DATA"	parameter 
      (Lime, Steve D (DNR))
   2. FOSS4G 2011 call for papers reminder (Lime, Steve D (DNR))
   3. RE: Too many open files... (Lee Meilleur)


----------------------------------------------------------------------

Message: 1
Date: Tue, 29 Mar 2011 11:24:26 -0500
From: "Lime, Steve D (DNR)" <steve.lime at state.mn.us>
Subject: [mapserver-users] RE: Overriding MapServer Map File "DATA"
	parameter 
To: Asad Ullah <Asad.Ullah at sigmaspace.com>,
	"mapserver-users at lists.osgeo.org"	<mapserver-users at lists.osgeo.org>
Message-ID:
	<A7F7B3043D3BF0438F1206BAA3C9933C08310A86A0 at MNMAIL05.ead.state.mn.us>
Content-Type: text/plain; charset="us-ascii"

You need to set a validation pattern to muck with the DATA attribute. You'd add something like this to your layer definition:

VALIDATION
  'data' '^terr_.*\.vrt$'
END

Steve

From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Asad Ullah
Sent: Tuesday, March 29, 2011 10:43 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Overriding MapServer Map File "DATA" parameter

List,
I am trying to override  virtual raster (.vrt) file defined in mapfile with a different one from a list of vrt files. I am using Opnelayers and Mapserver 5.6.6 to create map. In Openlayers, I have tried:

var Terra250tif = new OpenLayers.Layer.MapServer( "Terra250m_bands1-4-3",
            "http://192.225.64.118/cgi-bin/mapserv?",
{
layers:"Terra250tif","map.layer[Terra250tif]":"DATA terr_ndvi.vrt",
map: '/usr/local/apache/htdocs/mapfiles/rrglobal_terra_250m_2011052jpg.map'
}, {singleTile:false});

The relevant part of the mapfile is:

LAYER
NAME "Terra250_367jpg"
    TYPE RASTER
    STATUS DEFAULT
    OFFSITE 0 0 0
  PROJECTION
    "init=epsg:4326"
  END
    DATA "terr_250m_2011052jpg.vrt"
      CLASS
          STYLE
            BACKGROUNDCOLOR 255 255 255
          END
      END
END


I looked at "mapserver.osgeo.org/cgi/controls.html....." but that did not helped. So, could anyone help with this.

Thanks,

Asad

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110329/14284c61/attachment-0001.html

------------------------------

Message: 2
Date: Tue, 29 Mar 2011 11:26:58 -0500
From: "Lime, Steve D (DNR)" <steve.lime at state.mn.us>
Subject: [mapserver-users] FOSS4G 2011 call for papers reminder
To: "mapserver-users at lists.osgeo.org"
	<mapserver-users at lists.osgeo.org>
Message-ID:
	<A7F7B3043D3BF0438F1206BAA3C9933C08310A86BE at MNMAIL05.ead.state.mn.us>
Content-Type: text/plain; charset="us-ascii"

Skipped content of type multipart/alternative-------------- next part --------------
_______________________________________________
Discuss mailing list
Discuss at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/discuss

------------------------------

Message: 3
Date: Tue, 29 Mar 2011 11:37:15 -0500
From: Lee Meilleur <lee.meilleur at gis.leg.mn>
Subject: RE: [mapserver-users] Too many open files...
To: Stephen Woodbridge <woodbri at swoodbridge.com>,
	"mapserver-users at lists.osgeo.org" <mapserver-users at lists.osgeo.org>
Message-ID:
	<EE2E75216F55D2458F566BD899F5DECAC9A09DF6BC at mail.lcc.local>
Content-Type: text/plain; charset="us-ascii"


The problem ended up being an issue with ulimit, the parameters I entered were not taking.  I found the page below which seems to have resolved the issue.  Thanks again for all of the suggestions.

http://www.xenoclast.org/doc/benchmark/HTTP-benchmarking-HOWTO/node7.html

Lee


-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Stephen Woodbridge
Sent: Monday, March 28, 2011 5:05 PM
To: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Too many open files...

Lee,

I think I have run into this before.
Turn off SELinux if it is running and I bet that is it.

Otherwise, try building mapserver from source, maybe you ahve a library or rpm packaging issue.

-Steve W

On 3/28/2011 5:57 PM, Jim Klassen wrote:
>
> Are you running anything else significant on the machine?
>
> It would generally be very difficult for MapServer, running in CGI 
> mode, to use up all the open files.
>
> The only cases I can think of that could be related to MapServer 
> serving shapefiles would be (1) FastCGI and a bug that isn't closing 
> files.  If this is the case, the issue should go away for awhile after 
> you restart apache.  (2) if you have some sort of tileindex with a 
> huge number of items in it or a tileindex that points back to itself.
>
> Otherwise, I could see this if something else on the machine is using 
> up all the file handles (globally or per user).
>
> Another random thought... is there some interaction with SELinux 
> (assuming you have SELinux enforcing)?
>
> I think you said this behavior was new... if so, has anything changed 
> on the machine lately?
>
> Sorry I can't be more helpful.
>
> Jim K
>
> On Mar 28, 2011, at 4:45 PM, Lee Meilleur wrote:
>
>> Fedora 12 Apache 2.2.14 Prefork MPM
>>
>> ./shp2img: error while loading shared libraries: librx.so.0: cannot 
>> open shared object file: No such file or directory (this was news to 
>> me)
>>
>> Serving shapefiles only.
>>
>> MapServer version 5.6.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
>> OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE 
>> SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
>> SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER 
>> SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR 
>> INPUT=GDAL INPUT=SHAPEFILE
>>
>> Thanks
>>
>> -----Original Message----- From:
>> mapserver-users-bounces at lists.osgeo.org
>> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Stephen 
>> Woodbridge Sent: Monday, March 28, 2011 4:29 PM To:
>> mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] Too 
>> many open files...
>>
>> On 3/28/2011 5:05 PM, Lee Meilleur wrote:
>>> Hello,
>>>
>>> Has anyone run into the error: "Too many open files: couldn't set 
>>> child process attributes: /var/www/cgi-bin/mapserv"? This error 
>>> shows up in an Apache error_log. A broken image now shows up for 
>>> MapServer layers since this started. I've tried changing the ulimits 
>>> or the MaxRequestsPerChild for Apache with no luck.
>>> Any other ideas?
>>
>> You probably need to give us more information like:
>>
>> Which OS? Which Apache version? Which Apache MPM module are you 
>> using? /var/www/cgi-bin/mapserv -v output?
>>
>> Does this happen when you run shp2img? What are you serving via 
>> mapserver? vectors, imagery, database, etc?
>>
>> -Steve W _______________________________________________
>> mapserver-users mailing list mapserver-users at lists.osgeo.org 
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>> _______________________________________________ mapserver-users 
>> mailing list mapserver-users at lists.osgeo.org 
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
> _______________________________________________ mapserver-users 
> mailing list mapserver-users at lists.osgeo.org 
> http://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


------------------------------

_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


End of mapserver-users Digest, Vol 38, Issue 57
***********************************************



More information about the MapServer-users mailing list