[OSM-Devserver] mod_tile/Tirex sometimes rendering checkered tiles

Jochen Topf jochen at remote.org
Mi Jul 14 16:53:05 CEST 2010


On Thu, Jul 08, 2010 at 03:14:47PM +0200, Kay Drangmeister wrote:
> Am 08.07.2010, 12:40 Uhr, schrieb Jochen Topf <jochen at remote.org>:
>
>> I guess its because the WMS request timeouted in the HTTP library. There is no timeout code
>> in Tirex at that point, so I guess it must be the library.
>
> I fixed it by inserting a "timeout()" definition just before the WMS request is
> sent out:
>
> /etc/tirex# diff -c -C 2 /home/kayd/Install/tirex/lib/Tirex/Backend/WMS.pm /usr/share/perl5/Tirex/Backend/WMS.pm
> *** /home/kayd/Install/tirex/lib/Tirex/Backend/WMS.pm   2010-07-02 18:39:56.000000000 +0200
> --- /usr/share/perl5/Tirex/Backend/WMS.pm       2010-07-08 13:55:48.000000000 +0200
> ***************
> *** 118,123 ****
> --- 118,125 ----
>
>       $self->set_status("wms request");
>
> +     $self->{'ua'}->timeout(1200);
> +
>       my $response = $self->{'ua'}->request(HTTP::Request->new(GET => $request));
>
>       if ($response->is_success() && $response->header('Content-type') eq 'image/png')
>
>
> So I hardcoded the timeout to 20 mins, but this really should come from some configuration file.
> Unfortunately, pearl escapes me completely, so please anyone gifted fixeth it.

I have now added code to the WMS backend so that it takes the timeout from the
backend_manager_alive_timeout setting in the config file (minus 10s so that it hits
before the backend_manager kills the process).

> How can I limit the number of concurrent WMS requests? As displayed by tirex-status:
>
>  Currently rendering: (num=1)
>   Map                           X          Y   Z Prio Age
>   osray                     69168      44528  17    1  90
>
> the "num" value. I managed to limit that only by limiting the "load", which seems wrong.

There are two settings for this:

In /etc/tirex/renderer/wms.conf you can set "procs" which is the number of
WMS backend processes that will be started.

And in /etc/tirex/tirex.conf you can set with the "maxproc" parameter of the
"bucket" config option how many of those backend processes will be used for
requests of different priority.

Jochen
-- 
Jochen Topf  jochen at remote.org  http://www.remote.org/jochen/  +49-721-388298