Commit Graph

427 Commits

Author SHA1 Message Date
c4c27c529f Move mod_tile_latecy munin graph to correct directory 2013-03-03 19:59:08 +00:00
03cef67fed Improve mod_tile_latency munin graph to show latencies split by zoom level 2013-03-03 19:58:29 +00:00
874f27a6c2 fix issues found by coverity static analysis in dir_utils.c 2013-03-02 16:49:55 +00:00
796407a030 fix issues found by coverity static analysis in gen_tile.cpp 2013-03-02 16:49:30 +00:00
f7582abb14 fix issues found by coverity static analysis in render_expired.c 2013-03-02 16:48:15 +00:00
b73e9ac5f8 fix issues found by coverity static analysis in render_old.c 2013-03-02 16:47:44 +00:00
914699a692 fix issues found by coverity static analysis in mod_tile.c 2013-03-02 16:47:13 +00:00
d07717d92f Fix issues found by coverity static analysis in daemon.c 2013-03-02 16:46:34 +00:00
23be0365a9 Revert previous commit as it broke builds under some conditions.
The following errors appeared on Ubuntu builds:

cc1: warning: command line option '-ftemplate-depth=300' is valid for C++/ObjC++ but not for C [enabled by default]
In file included from store.h:9:0,
                 from store.c:21:
render_config.h:6:1: error: expected identifier or '(' before '/' token
render_config.h:15:1: error: stray '#' in program
...

As I don't know why this broke, or how to fix it, I am reverting this patch for now. It also only triggeres after a make distclean
2013-03-02 15:37:30 +00:00
80cd238d06 no need to check for mapnik dependencies, just check for mapnik 2013-02-26 17:53:32 +00:00
158353abfc fix compile with clang 2013-02-26 17:50:48 +00:00
7eb2c19049 adapt to mapnik >= 2.2.0 which does not provide a default ctor for mapnik::projection 2013-02-26 17:45:59 +00:00
c6b3c43460 [mod_tile] Enable mod_tile to connect to renderd via TCP socket
So far mod_tile could only connect to renderd via a unix domain socket.

Renderd was already able to accept tile rendering requests on tcp sockets
to enable it to be distributed accross multiple servers. With adding this
feature to mod_tile, it is now possible to have renderd on a different server
than mod_tile.

If multiple IPs are registered to the renderd dns entry, it supports a simple
form of automatic fail over, although a more sophisticated solution is likely
necessary for proper high availability setups.
2013-02-24 19:50:57 +00:00
358c107549 [renderd] Make renderd's TCP socket IPv6 compliant 2013-02-24 19:19:25 +00:00
c3bc037720 typo 2013-02-22 22:42:15 +00:00
cd450ef2b2 fix tile path 2013-02-20 11:59:13 +00:00
ff7f0e3830 Renderd seg faulted if the database connection was reset 2013-02-17 20:51:09 +00:00
a6329a0e2b Correctly print the version string of mapnik in renderd 2013-02-12 22:09:07 +00:00
66a692f44f [render_expired] Set back date by exactly 20 years for touch
based expiry

With a set back of 20 years rather than to a specific date,
the actual render time gets preserved and can be checked in
e.g. mod_tiles tile status
2013-01-14 17:41:23 +00:00
53c9bcb4be [mod_tile] report atime in /status as well.
Add a warning to the status page that neither create time nor access time might be accurate.

Create time is manipulated by the tile expiry process, and atime is often disabled on the filesytem via noatime
for performance reasons.
2013-01-14 16:12:39 +00:00
f442f03a52 [mod_tile] log and graph time to retrieve tiles from disk
Adds a munin graph to monitor the average time it takes to retrieve a served tile
from disk. This can be useful to check if the underlying disk system is fast enough
to handle the load of serving tiles. It does not include time required for pontential
rendering on the fly, nor the time to deliver the tile over the network.
2013-01-14 08:45:38 +00:00
b6d79fdc9c [mod_tile] Fix double free bug in tile config loading
Reported by 7bitbyte, diagnosed by fabianpr on help.osm.org
2013-01-12 16:10:24 +00:00
5960b28799 [mod_tile] fix memory leaks
Fixes coverity scan issue #746958 and #746957
2012-12-16 21:31:57 +00:00
b2a9292b7d Fix off by one error in string length guard
Fixes coverity scan issue #751697
2012-12-16 21:31:16 +00:00
685d3c2077 [mod_tile] Fix resource leaks during configuration read
Found via coverity scan
2012-12-16 21:30:44 +00:00
57049cb38a [mod_tile] Fix missing va_end
Fixes coverity issue #751708
2012-12-16 21:30:08 +00:00
59643da338 [renderd] Mapnik trunc has changed the API on mapnik::datasource_cache::instance() 2012-12-07 16:48:47 +00:00
531dbe3a55 [mod_tile] Fix missing commas in tilejson spec
Also change the default attribution to reflect the change to ODbL
2012-12-04 08:30:09 +00:00
4ce939f145 [mod_tile] Fix previous X-Forwarded-For commit to support chains of X-Forwarded-For
If there are multiple proxies on the path, then X-Forwarded-For is not a single address, but a list
of addresses.

One can now choose whether one wants to use the first entry in the chain, which should be the client address,
or the last entry in the chain.

The first entry of the chain can't necessarily be trusted, as the client can create its own X-Forwarded-For http header
and thus manipulate the IP that the tileserver would use for throttling.

Using the last entry is particularly useful if one has a reverse proxy in front of the tileserver. In that case the
proxy is under ones own control and can be trusted.
2012-12-01 19:07:32 +00:00
154e9484b8 [mod_tile] Use X-Forwarded-For to determine remote IP in tile throttling
If a tileserver is behind a (reverse) proxy server it only sees the IP of the proxy.
So all requests from the proxy get put in the same bucket for tile throttling. Instead, now
use the X-Forwarded-For http header to determine the IP of the originating client.
2012-12-01 17:41:41 +00:00
d3519ec5f8 [mod_tile] Fix get_load_avg calculation
mod_tile.c was missing an include file resulting in a wrong return type
2012-11-11 06:54:33 +00:00
b29ed4ed23 [mod_tile] Add support for CORS ( Cross-origin resource sharing )
XMLHttpRequest as used for example in KothicJS to display json vector tiles can by default
request tiles from the same origin. So for example if the KothicJS page is loaded from
http://toolserver.org/ but mod_tile serving the json tiles are hosted on http://a.www.toolserver.org
the browser can not access the tiles with out cross-origin resource sharing.

This patch adds support for cors to allow this kind of usage.
Tile layers configured via AddTileMimeConfig in the apache site config with a mimetype of JS
automatically have the CORS policy set to Access-Control-Allow-Origin: *

It is also possible to explicitly set the cors policy for all types of layers if they are configured
via mod_tile.conf/renderd.conf. Here the CORS parameter in the tile layer section allows to
specify it.
2012-11-10 21:38:47 +00:00
7f9ca71a79 [mod_tile] Print actual load mod_tile is assuming in debug messages 2012-11-10 17:28:06 +00:00
efc0eb64b2 [mod_tile] Portability fix for Solaris.
Solaris 10 does no have a vasprintf function. So preallocate the memory and use vsnprintf
2012-11-10 17:24:42 +00:00
95416addfb [mod_tile] s6_addr32 in in6_addr is not portable.
Use s6_addr instead and cast it to uint32_t
2012-11-07 16:02:43 +00:00
595ffc9e27 [mod_tile] support storage of gzip compressed content in metatiles
In some cases (e.g. geojson vector tiles) storing the content of metatiles in compressed form can be benefitial.
In this case, make sure that the Content-Encoding header is set to gzip, so that clients can correctly
decode the data.

Wether data in a metatile is stored in compressed form or not is defined by the first 4 magic bytes, which are either
META for uncompressed data or METZ for compressed date.

Currently mod_tile does not yet support decompressing the data it self. So if a client doesn't send the
Accept-Encoding: gzip header, they will get jumbled (still compressed) content back.
2012-11-06 19:10:25 +00:00
777720c2b4 [mod_tile] include new configuration parameters for mod_tile in the sample renderd.conf 2012-11-06 03:50:21 +00:00
7d6ae36d30 [mod_tile] Fix build to include sys_utils.c 2012-10-26 04:37:29 +00:00
01c7cd6c95 [mod_tile] Used the wrong preprocessor directive for the getloadavg check 2012-10-03 06:43:31 +00:00
6e7cea1baf [mod_tile] Support tile throttling with IPv6 as well 2012-09-15 23:56:59 +00:00
966e337620 [mod_tile] fixup previous commit 2012-09-15 23:55:07 +00:00
40309239cd [mod_tile] Forgot to commit new files in the previous commit 2012-09-15 19:40:55 +00:00
d27101ee6f [mod_tile] Add some configure compatibility fixes for solaris 2012-09-15 18:35:50 +00:00
697fcd9d3f [renderd] fixup the previouse daemon_compat.c commit for solaris 2012-09-02 22:16:44 +00:00
3acfc86c6b [renderd] Some operating systems don't have the "daemon" function
Include a compatibility version of the daemon function for these cases
2012-09-02 02:27:01 +00:00
9f284bfece [mod_tile] bzero is defined in <strings.h> but was not included
On Linux strings.h must have been included through some other header, 
but on solaris it isn't. So it needs to explicitly be included.
2012-09-02 01:15:26 +00:00
ad377f0fc6 [mod_tile] Fix gcc compiler warnings by adding some "const" qualifiers 2012-09-01 18:33:24 +00:00
68bcb756ca [mod_tile] Make minimum and maximum zoom levels per layer configurable
The minimum and maximum zoom levels can now be specified on a per layer
basis with the parameters "MINZOOM" and "MAXZOOM" in renderd.conf

Raise the maximum supported zoom level to 30

This only effects mod_tile for the moment. Renderd does not yet support configurable zoom levels, although
raising the compile time constant MAX_ZOOM should work.
2012-08-28 06:56:15 +00:00
e5d325e0b9 [mod_tile] Commit changes to the debian build script to reflect the ppa packages 2012-08-27 15:17:13 +00:00
04eeb18e8f typo 2012-08-25 14:54:11 +00:00