* Takes about 3-5 minutes
**Also:**
* Split up `Lint` and `Build & Test`
* Into independent workflows
* Changed `.tar` compression to `GZip`
* `--zstd` not available in `CentOS 7`
* Also excluded `.git` & `.gitignore`
* Created `Provisioning` local action
* Combining update & install steps, etc.
* Added libraries to `Ubuntu` build dependencies
* `libmemcached-dev` & `librados-dev`
* In order to test for successful compilation
* ~~Reduced `build-archive` retention to 1 day~~
* Updated `ax_pthread` macro
* While trying to resolve `apxs` failure
* http://www.gnu.org/software/autoconf-archive/ax_pthread.html
* Using [`GLib Logging Framework`](https://developer.gnome.org/programming-guidelines/stable/logging.html.en) for logging
* Created new `g_logger` function for logging
* Outputs to `stdout`/`stderr` only when running in `foreground`
* `stderr` for `message`, `warning`, `critical` & `error` levels
* `stdout` for `debug` & `info` levels
* Use `G_MESSAGES_DEBUG=all` environment to enable `debug` to print
* Otherwise, output will be to `syslog` or `systemd journal` (when appropriate)
* Standardized usage of `{LOG_PRIORITY}: ` prefix in log messages
* Only when using `syslog`, otherwise `GLib Logging` will take care of it
* Changed `fprintf(stderr`, `printf` & `perror` calls to `g_logger` calls
* You might want to check them out closely to make sure I chose the right levels
* No changes to `logging/output` were made to "`foreground`" programs (I.E. `render_*`)
* Changed `0`,`1` to `no_argument`,`required_argument` in `getopt_long`'s `long_options`
* Fixed `renderd`'s `foreground` opt (should be `no_argument` [0] rather than `reguired_argument` [1])
* Basic test for `mod_tile` module
* ~~Extended `renderd` log priority onto Mapnik's logger~~
Explicitly state that Debian helper scripts require packages and configuration section does not apply when building from source.
Fixes#241 misunderstanding.
select() has a well-known limit and the maximum file descriptor
that can be used (FD_SETSIZE). On Linux it is in most cases 1024.
Our renderd uses a lot of planet tiff files, so it had already
more than 1600 FDs for tiff files open. That means any new FD gets a
number bigger than that and using such FDs in select() leads to crashes
(because select() uses a fixed size bitmap).
The same can happen in mod_tile if the surounding web server is very
busy, altough it is less likely to happen there.
Changes in src/mod_tile.c:
- include poll.h
- poll timeout is an int containing miliseconds
- use "s > 0" instead of "s == 1" as success
(although it should never be >1)
- different log message for timeout and error case
Changes in src/daemon.c:
- remove include for sys/select.h
- replace connections array by new array pfd used in poll()
- include special FDs (exit and listen) at index 0 and 1 in this array
- no longer reorganize array while iteratig through it.
That would have led to items being skipped.
Instead mark array slots with fixed connections with
a negative FD. These are automatically skipped by poll.
Reuse these slots later when new connections come in.
- rename num_connections to num_cslots (initial segment
of the array that poll() should check) and
num_conns (number of slots in this segment, that are
actually used by connections; this number is only
used in logging).
- slightly enhance debug log lines