[mapserver-users] Re: Reloading MapCache configuration file on changes?

thomas bonfort tbonfort at terriscope.fr
Wed Feb 22 03:16:44 PST 2012


kept in memory accross the lifetime of the process. the conf file is
accessed at each request to check it's modification time though if you
have enabled auto reloading.

--
tb

On Wed, Feb 22, 2012 at 12:00, Pavel Iacovlev <iacovlev.pavel at gmail.com> wrote:
> Thank you for the sudo rule suggestion and for detailed explanation!
>
> Just one more question, if I use MapCache as fcgi, does this mean that on
> every request the configuration will be read and parsed ? or the
> configuration will be kept in memory until a the fastcgi process killed
> and respawned ?
>
>
> On Wed, Feb 22, 2012 at 12:37 PM, thomas bonfort <tbonfort at terriscope.fr>
> wrote:
>>
>> On Wed, Feb 22, 2012 at 11:22, Pavel Iacovlev <iacovlev.pavel at gmail.com>
>> wrote:
>> > apache2ctl -k graceful is not really an option for me because I would
>> > have
>> > to give root privileges to my apache/php.
>> you can create a sudo rule that only allows a user to run apache2ctl
>> -k graceful without giving full root access.
>>
>> >
>> > "AFAIK, this isn't possible." I don't know anything about apache modules
>> > and
>> > stuff so the next thing I say may not be applicable or just plain
>> > stupid,
>> > but maybe each process will hold their own copy of configuration so the
>> > apache process will be able to alter it's configuration upon detection
>> > of
>> > file change. There is certainly that added overhead of "checking last
>> > modified date" and keeping more copies in memory, but this should not be
>> > the
>> > default behavior.
>>
>> afaik, at the request level (which is were the freshness test would
>> occur), there's no way of freeing the memory that allocated the
>> initial configuration, and no way of allocating memory for the new
>> configuration that would live across the upcoming requests.
>>
>> >
>> > On Tue, Dec 6, 2011 at 1:00 PM, thomas bonfort <tbonfort at terriscope.fr>
>> > wrote:
>> >>
>> >> AFAIK, this isn't possible. Inside an apache module, the configuration
>> >> is considered read-only as it is shared between multiple worker
>> >> threads/processed spawned by httpd.
>> >>
>> >> apachectl configtest && apachectl graceful will restart the server
>> >> gracefully, i.e. without aborting ongoing requests, and will load the
>> >> new configuration for subsequent requests.
>> >>
>> >> --
>> >> thomas
>> >>
>> >> On Mon, Dec 5, 2011 at 23:37, John Taranu
>> >> <jtaranu at firstbasesolutions.com> wrote:
>> >> > Thomas,
>> >> >
>> >> >
>> >> >
>> >> > Is there a better way force MapCache to reload its configuration
>> >> > script
>> >> > than
>> >> > restarting apache?  I’m working on an application that will use two
>> >> > load-balanced web servers running MapCache, all pointing to a single
>> >> > central
>> >> > tile repository and a single central .xml configuration file.  The
>> >> > configuration file will occasionally be edited, either with deletions
>> >> > or
>> >> > additional tilesets.  Both web servers need to reload the updated
>> >> > configuration .xml.
>> >> >
>> >> >
>> >> >
>> >> > Is it possible to set up MapCache to check if the config file was
>> >> > recently
>> >> > updated and, if so, reload the config .xml?  It looks like this is
>> >> > currently
>> >> > enabled under FastCGI, but not under Apache.
>> >> >
>> >> >
>> >> >
>> >> > John
>> >> _______________________________________________
>> >> mapserver-users mailing list
>> >> mapserver-users at lists.osgeo.org
>> >> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>> >
>> >
>
>


More information about the mapserver-users mailing list