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

Kay Drangmeister kay at drangmeister.net
Do Jul 8 15:14:47 CEST 2010


Hi,

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.

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.

Regards,
Kay