Commit Graph

520 Commits

Author SHA1 Message Date
d86347b6e0 Merge pull request #45 from tomhughes/munin
Fix munin plugin bugs
2013-08-29 14:21:55 -07:00
9dd09e5ff8 Correct derivation expression for renderd_zoom_time munin graph 2013-08-29 22:00:01 +01:00
d6cbcbba0c Correct axis label for renderd_queue_time munin graph 2013-08-29 22:00:00 +01:00
dc8d5e06d4 Set min value of 0 for munin graph render time spent by 2013-08-29 00:35:39 -06:00
3b2fcd5ba2 Fix sending back NotDone from renderd immediately if
request doesn't fit into a rendering queue

RenderPrio, Render and RenderLow queues each only have a size of 32 entries. If these are full,
then requests overflow into the dirty queue. If this happens, renderd should send the NotDone
back immediately so that mod_tile doesn't wait for potentially a long time.

This however only worked for Render requests, but not RenderPrio or RenderLow. This patch fixes this.
2013-08-29 00:34:56 -06:00
b2d4993807 Use Stack in the munin graph of queue_time 2013-08-29 00:34:06 -06:00
c483c07338 Try and be more helpful with error messages if an exception is thrown while saving.
Also don't exit renderd entirely if an exception is thrown during saving.
2013-08-17 14:41:58 -06:00
b94be88ebb Add a OSGB36 projection to renderd
Add some tests for tile number to projected coordinate bounds
2013-08-16 02:36:27 -06:00
0ce9f43437 Allow to configure different aspect ratios of tiles.
For example for Plate Carree which has a 2x1 ratio
or OSGB which can use a 1x2 ratio
2013-08-16 02:35:31 -06:00
01b2c52425 Merge pull request #40 from tomhughes/cors
Improve CORS support
2013-08-13 09:47:33 -07:00
b5bd1cd686 Yet another attempt to fix the mapnik-config issue (probably not the last...) 2013-08-13 09:59:18 -06:00
4c2faccb12 Improve CORS support
* Only treat OPTIONS as preflight if Access-Control-Request-Method  is set
* Only send Access-Control-Allow-Headers for preflight requests
* Don't send a bogus Access-Control-Allow-Headers value
2013-08-13 09:33:04 +01:00
c19b387af8 Update the readme.txt somewhat by deleting old and outdated content
This likely needs more improvements to make the readme actually useful.
But for now this mostly removes parts of the readme that were totally
out of date and confusing.
2013-08-10 23:21:58 -06:00
dd57fa7ea3 significantly increase the load thresholds after which mod_tile reduces rendering
sets the new MaxLoadMissing to 50 and MaxLoadOld to 16.

With the prevalence of multi core servers today, the previous
default thresholds of 10 and 5 were becoming to lower than the average
CPU count. Furthermore, load is not an ideal measure, as it includes I/O
load and much of the I/O load might well come from serving rather than
rendering. Especially if the database is on a separate SSD. Lastly, using
the thresholds in mod_tile isn't super helpful, as due to hysteresis of
 rendering queues stop submitting tiles at a time of high load is not
particularly helpful without stopping rendering from the queue.
2013-08-10 23:09:54 -06:00
1b4c56d8ed Add another priority level (RenderLow) to accommodate rerenders after style changes
In addition to Render and RenderPrio, add another priority level of RenderLow.

The idea is that if you rerender all tiles by touching planet-import-complete and
thereby likely overloading the server's rendering capacity you want to prioritize rerendering
of tiles that were explicitly marked dirty due to data changes over rerendering
due to planet-import-complete updates.

This is achieved by splitting rendering requests by if they are "old", or "very old".
As the tile expiry sets back the modification date many years, mod_tile splits
rendering requests based on how old the tiles are. If they are no more than a
certain threshold (currently set to one year) old, they are rendered with lower priority.
2013-08-10 23:05:28 -06:00
6f85a79375 Fix typo in install path of makefile 2013-08-09 20:29:26 -06:00
2fc098dfd8 Remove outdated files that haven't been touched in 5 years. 2013-08-09 19:35:37 -06:00
273973ed03 Clean up mod_tile directory by moving source files into a common src/ sub directory
also move includes into includes/
2013-08-09 18:46:10 -06:00
a975db9074 Another attempt at including mapnik include directories from mapnik-config
use mapnik-config --includes rather than --cflags (as was attempted in 23be036).

This should fix #35
2013-08-09 18:44:06 -06:00
f10e357f55 Fix #38 clock_gettime needs -lrt on some systems 2013-08-09 18:42:37 -06:00
df9be038a6 Add a munin graph to display the time spent rendering in each queue
This is useful to determine how many resources are used to render missing tiles
and how many to keep things up-to-date
2013-08-04 08:51:26 -06:00
6203668b37 Keep track of how much time is spent with rendering tiles from each queue 2013-08-04 08:48:21 -06:00
b44d992fc9 Make munin graphs support Z19 and Z20 2013-08-04 08:46:40 -06:00
81a0f52dab Improve diff-importing and tile expiry script 2013-08-04 08:38:57 -06:00
86d71d50b6 Don't install the unit test program into bin directory 2013-07-12 14:45:16 -06:00
eae2eaec1c Merge pull request #32 from tomhughes/master
Allow render_old to take a unix timestamp
2013-06-19 10:40:30 -07:00
965f77a31e Allow timestamp to be specified to render_old as a unix timestamp 2013-06-19 18:24:39 +01:00
6e1f6afdad The test suit was not generating unique items to add to the queue
The de-dupplication of the queue then resulted in unexpected behaviour.

This should fix the test suite
2013-06-15 11:09:27 -06:00
dd75339f8d Free memory when the request queues get closed. 2013-06-14 12:16:58 -06:00
54ea7a4375 Fix some minor memory leaks in the testing frame work.
There are still a number of memory leaks in the queueing tests
2013-06-14 12:11:11 -06:00
4e9b24daa8 Set mapniks max_size parameter in renderd if configured to use more than 10 threads.
The default postgresql connection pool size of mapnik is 10, which can get exhausted
on modern multi-core servers.

This sets the max_size parameter to 2 larger than the thread count unless it is
explicitly set in the loaded stylesheet.
2013-06-12 01:55:03 -06:00
7145be95ea Changed the default supported max zoom of rendrd to 20
While mod_tile could handle much higher zoom levels already, renderd was stuck with z18,
unless one changed the compile time setting.

This changes the maximum supported zoom level to z20 out of the box. Furthermore,
it is now possible to set max and min zoom level per style in renderd.conf (as long
as they are within the range.)

Zoom levels higher than z20 are currently not supported out of the box, especially with
the file based storage backend. The directory hash function only supports 40 bit (20 bit for each X and Y).
2013-05-30 23:53:21 -06:00
1db2d4158c Warn if maxzoom in renderd.conf is set higher than the
compile time specified variable in renderd

Currently renderd doesn't actually respect the maxzoom variable in renderd.conf. (only mod_tile does)
2013-05-30 23:52:23 -06:00
91a2e1d716 Add some tests for the default file storage backend 2013-05-30 20:32:18 -06:00
299ac3bdd3 Refactor some functionality out of gen_tile.cpp
Move metatile handling and tile cache expiry out of gen_tile.cpp into
seperate files for reuse and cleaner structure.
2013-05-30 20:31:23 -06:00
4cf301b06b Only set buffer_size if it hasn't already been set via the style-sheet
It assumes that one doesn't set an explicity buffer_size of 0 and thus
all buffer_sizes are the default for which renderd then overwrites it to
buffer_size 128.

Addresses issue #17
2013-05-22 21:29:00 -06:00
2c538916be [Bug fix] mod_tile was not correctly thread-safe in Apache 2.2 and could segfault.
Apache's memory pool operations aren't thread-safe. In get_storage_backend
multiple threads could try to allocate memory on the process pool concurrently
leading to segfaults. To prevent this, wrap that code into a mutex.

Benchmarking seems to indicate, that even though each request has to acquire the lock
this does not appear to have a performance impact.

The issue was reported by Sven Geggus, and diagnosed by Tom Hughes. Thanks.
2013-05-22 20:36:47 -06:00
a401159d4b Partially revert previous commit for logging and fix it.
The previous patch did not take different storage backends into account,
or different tile path locations.
2013-05-22 00:59:44 -06:00
1daf09a693 Merge pull request #26 from plepe/log-start-tile
Log start tile
2013-05-21 23:17:08 -07:00
8b8745e424 Merge pull request #24 from plepe/bugfix
Daemon: fix typo in #define
2013-05-21 23:15:34 -07:00
7028bde54f Add time of old metatile to item structure, print age when starting rendering
- struct item got value 'old_mtime', holding the time of the old metatile (or 0
  for new tiles)
2013-05-22 06:28:07 +02:00
911670bc23 gen_tile: Instead of two DONE messages write START and DONE messages 2013-05-22 06:28:07 +02:00
015f799860 Daemon: fix typo in #define 2013-05-22 06:15:58 +02:00
cc4003c1b4 Don't ignore all .m4 files, only autogenerated ones 2013-05-16 22:47:34 -06:00
7290a4cde1 Merge pull request #20 from ramunasd/master
fix issue #18, ignore compilation files
2013-05-16 21:33:22 -07:00
3463f441e2 Merge pull request #23 from pnorman/patch-1
Change absolute URL in slippymap.html to a relative one
2013-05-16 18:51:51 -07:00
7e57144dad Change absolute URL in slippymap.html to a relative one
If we're browsing from a different machine localhost is the wrong hostname.
2013-05-16 16:28:03 -06:00
b7cb20df4b Merge pull request #22 from zerebubuth/master
Fix null storage missing symbol
2013-05-14 08:41:12 -07:00
798763820f Added missing null storage source file for APXS build. 2013-05-14 13:05:23 +01:00
fef2c0ac6f add git ignores 2013-05-13 22:35:21 +03:00