[mapserver-users] MapCache: Disabling WMS requests for fully-seeded caches?

thomas bonfort thomas.bonfort at gmail.com
Tue Nov 29 16:27:24 EST 2011


hmm, ok, you're using the mixed image format for the empty image, and
that was not a supported use-case. I've just commit a fix that fixes
the issue for me here.

regards,
thomas

On Tue, Nov 29, 2011 at 22:13, thomas bonfort <thomas.bonfort at gmail.com> wrote:
> I'll have a look, but my config that doesn't segfault is using JPEG.
> Note that the 404 error code is the way it's supposed to work, if you
> inspect the headers and body you should see a image/jpeg mimetype, a
> jpeg body, and an X-MapCache-Error header explaining what happened.
>
> --
> thomas
>
> On Tue, Nov 29, 2011 at 21:22, John Taranu
> <jtaranu at firstbasesolutions.com> wrote:
>> Note that setting the default format to PNG doesn't cause a segmentation
>> fault:
>>
>>
>>   <default_format>PNG</default_format>
>>   <errors>empty_img</errors>
>>
>> However, in this case mapcache still returns a HTTP 404 instead of a blank
>> image.
>>
>>
>>
>> -----Original Message-----
>> From: Travis Kirstine [mailto:traviskirstine at gmail.com]
>> Sent: Tuesday, November 29, 2011 3:21 PM
>> To: thomas bonfort
>> Cc: John Taranu; mapserver-users at lists.osgeo.org
>> Subject: Re: [mapserver-users] MapCache: Disabling WMS requests for
>> fully-seeded caches?
>>
>> Thomas,
>>
>> Here is the backtrace:
>>
>> (gdb) run -X
>> Starting program: /usr/sbin/httpd -X
>> warning: no loadable sections found in added symbol-file system-supplied DSO
>> at 0x2aaaaad1b000 [Thread debugging using libthread_db enabled]
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x00002aaaaca4e32b in strstr () from /lib64/libc.so.6
>> (gdb) bt
>> #0  0x00002aaaaca4e32b in strstr () from /lib64/libc.so.6
>> #1  0x00002aaab539737d in mapcache_image_create_empty () from
>> /usr/lib64/httpd/modules/mod_mapcache.so
>> #2  0x00002aaab53971fe in mapcache_configuration_parse_xml () from
>> /usr/lib64/httpd/modules/mod_mapcache.so
>> #3  0x00002aaab53a047a in mapcache_configuration_parse () from
>> /usr/lib64/httpd/modules/mod_mapcache.so
>> #4  0x00002aaab53879e6 in mapcache_add_alias (cmd=0x7fffffffe760, cfg=<value
>> optimized out>, alias=0x2aaaaae0f850 "/mapcache",
>>    configfile=0x2aaaaae0f860 "/var/www/html/mapcache/mapcache.xml")
>> at mod_mapcache.c:502
>> #5  0x00002aaaaaad5c4b in ?? ()
>> #6  0x00002aaaaaad60d0 in ap_walk_config ()
>> #7  0x00002aaaaaad6232 in ap_process_config_tree ()
>> #8  0x00002aaaaaac1c51 in main ()
>> (gdb)
>>
>> #################################################################
>>
>> MapCache snippet:
>>
>>  <default_format>mixed</default_format>
>>
>>  <errors>empty_img</errors>
>>
>> Regards
>>
>>
>>
>>
>> On 29 November 2011 11:56, thomas bonfort <thomas.bonfort at gmail.com> wrote:
>>> I've just tried report_img locally without issues, any chance you can
>>> provide a backtrace ?
>>>
>>> On Tue, Nov 29, 2011 at 17:32, John Taranu
>>> <jtaranu at firstbasesolutions.com> wrote:
>>>> Hi Thomas,
>>>>
>>>> Thanks for the suggestion.  Commenting out the source block disables the
>> WMS requests.
>>>>
>>>> However, the error reporting seems to be broken.  Setting
>> <errors>empty_img</errors> crashes Apache with a segmentation fault
>> (mod_mapcache SVN revision 12828).  Setting <errors>report</errors> throws
>> HTTP 404 responses, which is a more reasonable result.
>>>>
>>>> John
>>>>
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: thomas bonfort [mailto:thomas.bonfort at gmail.com]
>>>> Sent: Tuesday, November 29, 2011 10:33 AM
>>>> To: John Taranu
>>>> Cc: mapserver-users at lists.osgeo.org
>>>> Subject: Re: [mapserver-users] MapCache: Disabling WMS requests for
>> fully-seeded caches?
>>>>
>>>> You can do this by commenting out the <source> block from the tileset
>> once the wanted tiles have been created. You'll probably also want set error
>> reporting to return blank images from that stage onwards.
>>>>
>>>> --
>>>> thomas
>>>>
>>>> On Tue, Nov 29, 2011 at 00:09, John Taranu
>> <jtaranu at firstbasesolutions.com> wrote:
>>>>> We have a fully seeded cache that was fully seeded to a polygon outline.
>>>>> The intent is to serve the tileset through a variety of services
>>>>> (WMS,
>>>>> TMS) using mod-mapcache.
>>>>>
>>>>>
>>>>>
>>>>> Tiles that are outside the polygon outline but still within the
>>>>> polygon bounding box should be blank tiles.  However, a request for
>>>>> one of these tiles results in a call to that tileset’s WMS source.
>>>>> This creates considerable overhead by starting up MapServer and
>>>>> writing the resulting tile to the cache.  Is there any way to
>>>>> disable the WMS calls for these blank tiles, and instead
>>>>> short-circuit the request to return a blank?  That is, once a
>>>>> tileset has been fully seeded, is it possible to disable any further
>>>>> calls to the WMS, so that requests for tiles that are not in the cache
>> return a blank?
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>
>>
>


More information about the mapserver-users mailing list