diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-12-18 17:48:06 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-12-18 17:48:06 +0300 |
commit | c6e6ea88a2e03609b0be013d2df0de1c6062712f (patch) | |
tree | 7492bb4cb0d47466c900319fa040b0d428560431 /src/cfg_file.y | |
parent | 1b1bcd6966f47a2568acee011dd4b9f18195d765 (diff) | |
download | rspamd-c6e6ea88a2e03609b0be013d2df0de1c6062712f.tar.gz rspamd-c6e6ea88a2e03609b0be013d2df0de1c6062712f.zip |
* Add limits support to each worker (max open files and max core size)
* Fix dependency on lex and yacc sources
Diffstat (limited to 'src/cfg_file.y')
-rw-r--r-- | src/cfg_file.y | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/cfg_file.y b/src/cfg_file.y index 15a9a91da..a4f7034d0 100644 --- a/src/cfg_file.y +++ b/src/cfg_file.y @@ -58,7 +58,7 @@ struct rspamd_view *cur_view = NULL; %token STATFILE ALIAS PATTERN WEIGHT STATFILE_POOL_SIZE SIZE TOKENIZER CLASSIFIER BINLOG BINLOG_MASTER BINLOG_ROTATE %token DELIVERY LMTP ENABLED AGENT SECTION LUACODE RAW_MODE PROFILE_FILE COUNT %token VIEW IP FROM SYMBOLS CLIENT_IP -%token AUTOLEARN MIN_MARK MAX_MARK +%token AUTOLEARN MIN_MARK MAX_MARK MAXFILES MAXCORE %token SETTINGS USER_SETTINGS DOMAIN_SETTINGS SYMBOL PATH SKIP_CHECK GROW_FACTOR %type <string> STRING @@ -229,6 +229,8 @@ workercmd: | bindsock | workertype | workercount + | workerlimitfiles + | workerlimitcore | workerparam ; @@ -302,6 +304,20 @@ workercount: } ; +workerlimitfiles: + MAXFILES EQSIGN NUMBER { + cur_worker = check_worker_conf (cfg, cur_worker); + cur_worker->rlimit_nofile = $3; + } + ; + +workerlimitcore: + MAXCORE EQSIGN NUMBER { + cur_worker = check_worker_conf (cfg, cur_worker); + cur_worker->rlimit_maxcore = $3; + } + ; + workerparam: STRING EQSIGN QUOTEDSTRING { cur_worker = check_worker_conf (cfg, cur_worker); |