Stefan Bühler
e76ebe2021
[core] rewrite config parser
...
* no more hash values - only lists and list of key-value pairs
* "master" config:
the config loaded on startup can use all features,
configs loaded later (vhost on demand from sql...) can't use
include* and cannot modify global vars.
* scoped variables
- add a global var store in the server struct
- global vars can be set with "global foo = bar"
- if a variable already exists in a scope it will be modified on a
write, otherwise a new local variable is created
- global vars won't be modified if not in "master" mode
- vars can be made explicitly local with "local foo = bar"; create a
local copy with "local foo = foo"
- globals vars are available in live config loads for reading
- each file and action block {...} creates a new scope; if/else branches do
NOT create a new scope
* to append a value to a list use "l + [v]" (not "l + v" anymore);
lists are concatenated with "+"
* [...] always marks a list
* (...) is a list if it contains a "," or "=>", otherwise it justs
groups an expression
* a list can either contain key-value pairs or other values. mixing is
not allowed
2013-09-06 16:43:26 +02:00
Stefan Bühler
061b2a4262
[core] handle differences between options/actions/setups in plugin.c
2013-08-22 18:02:50 +02:00
Stefan Bühler
95f63fc0cf
[core] add global named fetch pool; all backends have to return strings. implement a simple backend.
2013-06-08 20:10:47 +02:00
Stefan Bühler
709296d796
fix bugs and warnings from compiler warnings (memset parameter order, shadow, ...)
2013-05-25 12:59:14 +02:00
Stefan Bühler
72ec9a432f
[throttle] rewrite
2013-05-23 17:56:24 +02:00
Stefan Bühler
e0d9c0d602
[core] register server prepare callbacks
2013-05-23 17:56:24 +02:00
Stefan Bühler
cfd8955008
[common] implement libev wrapper
...
* need a way to mark a watcher as "don't keep the loop alive"
2013-05-23 17:56:23 +02:00
Stefan Bühler
0d85a068c8
[lua] add per lua_State lock
2013-05-04 13:11:25 +02:00
Stefan Bühler
f2ade38923
Release mainaction before stopping workers
2013-05-03 18:57:58 +02:00
Stefan Bühler
01abf704a3
[lua] Use recursive lock for global lua lock
2012-12-06 15:43:11 +01:00
Stefan Bühler
a0227182d6
Fix small memleak with server sockets
2012-03-17 15:38:44 +01:00
Stefan Bühler
0fcbfb7ab7
[core] optimize syscalls per connection
2011-05-04 15:23:53 +02:00
Stefan Bühler
c35cf21c52
[log] Add basic api to open log files via angel
2010-09-25 14:13:29 +02:00
Thomas Porzelt
31d2291a1c
[core] Add support for throttling by IP
2010-09-23 21:01:46 +02:00
Stefan Bühler
823b9d13c2
[core]: wait for connections before shutdown
2010-09-21 14:33:32 +02:00
Thomas Porzelt
47bc318a35
[core] Make li_server_ts_format_add() threadsafe
2010-09-19 18:03:11 +02:00
Thomas Porzelt
14d48527af
[core] Make log.timestamp creation/destruction threadsafe
2010-09-19 18:00:31 +02:00
Thomas Porzelt
a3b7ce74af
[core] Rework throttle-pool handling to be thread-safe in creation/destruction aswell as more accurate and fair throttling
2010-09-12 18:54:57 +02:00
Thomas Porzelt
c7a39e4da1
[core] Fix compilation on non-linux systems
2010-09-11 11:34:06 +02:00
Thomas Porzelt
9c63e60cb7
[core] Add workers.cpu_affinity setup action
2010-08-29 12:24:30 +02:00
Stefan Bühler
1c3d3c287f
[core]: add tasklet pools to workers and use them for stat-cache
2010-08-25 18:05:23 +02:00
Stefan Bühler
a2ed50dedd
Optimize some socket initialization handling
2010-08-11 12:56:01 +02:00
Thomas Porzelt
c8663ffda9
[core] Allow disabling of stat cache through stat_cache.ttl 0;
2010-07-18 13:53:07 +02:00
Thomas Porzelt
a5f6e08abd
[core] Fix for last commit: undefined flag with older libev headers so have to use makros
2010-07-11 21:07:09 +02:00
Thomas Porzelt
396f740e77
[core] Use EVFLAG_NOSIGFD to disable signalfd usage if libev 3.8 is used, it breaks signal handling
2010-07-11 20:52:01 +02:00
Stefan Bühler
69f4ad2b4b
Don't set RLIM_INFINITY as rlim_cur for RLIMIT_NOFILE, use 4096 if rlim_cur < 4096 and rlim_max = inf
2010-06-12 11:43:12 +02:00
Stefan Bühler
5e063e2b04
[core] Enable li_plugins_init_lua again, fixed segfault
2010-06-06 12:29:25 +02:00
Thomas Porzelt
b5009f18df
[core] Fix usage of sched_setaffinity() and disable it for now as it seems to impose a little performance hit
2010-05-16 18:35:54 +02:00
Stefan Bühler
a8efcfcc0e
modify plugin api to include worker context for action/option parsing; add per-worker callback for stop_worker
...
* create main_worker earlier
2010-05-07 20:54:50 +02:00
Thomas Porzelt
86e039e6d2
[core] Add --module-resident commandline parameter to prevent module unloading. Useful for valgrind or tcmalloc
2010-05-06 22:42:47 +02:00
Stefan Bühler
c0f5b9b151
server.c: free srv->statelock
2010-02-14 21:04:47 +01:00
Stefan Bühler
905a83fc77
Add plugin hooks for server state machine changes
2010-02-13 15:41:09 +01:00
Stefan Bühler
30ebce774e
Add "state-wait" api for server state machine
2010-02-13 15:29:21 +01:00
Stefan Bühler
f14103bc2c
Split options into two categories: simple (int, bool) and ref-counted pointers
2010-01-24 23:00:51 +01:00
Stefan Bühler
d9228f3ef0
Add per worker lua_State
2009-11-01 15:43:12 +01:00
Stefan Bühler
a151eeac2f
Prefix li_ cleanup, verified with nm -g --defined-only
2009-10-09 15:38:12 +02:00
Stefan Bühler
855ac43999
Fix small copy/paste bug
2009-10-04 14:27:48 +02:00
Stefan Bühler
a14a709237
Add max-connections check, set to max-fds/4
2009-10-04 14:25:59 +02:00
Stefan Bühler
8ac057d3d5
angel: Add wrapper, env and copy-env to instance config
2009-10-03 21:14:34 +02:00
Stefan Bühler
aadbf51c84
Fix two more leaks, add some safe = NULL inits, free ssl error strings
2009-10-02 12:09:37 +02:00
Thomas Porzelt
1df869edc3
[waf] Add missing checks for localtime_r() and gmtime_r()
2009-09-13 22:29:13 +02:00
Stefan Bühler
659ebfdd16
Add core lua support to handle requests
2009-09-13 17:54:16 +02:00
Stefan Bühler
f030824550
Fix server address (do not use the listen address)
2009-09-09 18:12:05 +02:00
Stefan Bühler
a663088a77
Add custom server socket callbacks (for ssl modules)
2009-09-08 19:09:39 +02:00
Stefan Bühler
56ff7ca32a
angel/lighty now synchronize the server state
2009-08-30 20:43:13 +02:00
Stefan Bühler
594987c29e
Add li_ev_safe_ref_and_stop macro and use it
2009-07-26 15:00:53 +02:00
Thomas Porzelt
e838c9b3cf
[core] Add liTimeFunc (gmtime_r, localtime_r) parameter to li_worker_current_timestamp()
2009-07-17 13:04:01 +02:00
Stefan Bühler
a061745193
Fix bugs found with the static clang analyzer ( http://clang-analyzer.llvm.org/ )
2009-07-16 22:13:40 +02:00
Stefan Bühler
f4f2bd1f38
Poison non-thread-safe functions and fix errors
2009-07-16 22:10:41 +02:00
Stefan Bühler
540ff7db02
Split sources into subdirs
2009-07-15 11:57:52 +02:00