switched to preforking daemon

This commit is contained in:
SJ
2012-01-07 00:00:36 +01:00
parent 0353b27f68
commit 05c379a163
19 changed files with 359 additions and 594 deletions

View File

@ -12,10 +12,10 @@ verbosity=1
username=piler
; number of worker processes, ie. the number of simultaneous smtp connections to piler.
number_of_worker_processes=5
number_of_worker_processes=10
; number of processed emails per each piler process
max_requests_per_child=50
max_requests_per_child=1000
; SMTP HELO identification string
hostid=av-engine.localhost
@ -36,7 +36,13 @@ session_timeout=420
; Please also note that the meaning of this variable depends on your Unix implementation
backlog=20
workdir=/var/spool/piler/tmp
workdir=/var/piler/tmp
; piler's own header to indicate previously archived messages
piler_header_field=X-piler: piler already archived this email
; comma separated list of your domains. piler uses this information to determine
; the direction of the given email
@ -53,7 +59,19 @@ memcached_servers=127.0.0.1
; 0 means records don't expire
memcached_ttl=86400
piler_header_field=X-piler: ahahahahaha
; whether to update counters to memcached (1) or to the database (0)
update_counters_to_memcached=0
; interval to sync memcached data (eg. counters) to database
; this setting is only effective if you have update_counters_to_memcached=1
;
; hint: if you are using a mysql replicated environment and you do _not_ want
; clapf to write to the replicated database (because you do sync it some other
; way to the master database or you are not interested in keeping the counters
; persistantly at all), then specify a big number here, that fits to the
; "long int" size, eg. 2147483647
memcached_to_db_interval=900
;
; mysql stuff

View File

@ -11,7 +11,7 @@ source main
sql_pass = sphinx
sql_query_pre = SET NAMES utf8
sql_query = SELECT id, `from`, `to`, `subject`, `arrived`, `sent`, `body`, `size`, `direction`, `attachments`, `deleted` FROM sph_index \
sql_query = SELECT id, `from`, `to`, `subject`, `arrived`, `sent`, `body`, `size`, `direction`, `attachments` FROM sph_index \
WHERE id<=( SELECT max_doc_id FROM sph_counter WHERE counter_id=1 )
sql_attr_uint = size
@ -19,7 +19,6 @@ source main
sql_attr_uint = sent
sql_attr_uint = direction
sql_attr_uint = attachments
sql_attr_bool = deleted
}
@ -34,7 +33,7 @@ source delta
sql_query_pre = SET NAMES utf8
sql_query_pre = REPLACE INTO sph_counter SELECT 1, MAX(id) FROM sph_index
sql_query_post_index = DELETE FROM sph_index WHERE id<=(SELECT max_doc_id FROM sph_counter WHERE counter_id=1)
sql_query = SELECT id, `from`, `to`, `subject`, `arrived`, `sent`, `body`, `size`, `direction`, `attachments`, `deleted` FROM sph_index \
sql_query = SELECT id, `from`, `to`, `subject`, `arrived`, `sent`, `body`, `size`, `direction`, `attachments` FROM sph_index \
WHERE id <= (SELECT max_doc_id FROM sph_counter WHERE counter_id=1)
sql_attr_uint = size
@ -42,10 +41,13 @@ source delta
sql_attr_uint = sent
sql_attr_uint = direction
sql_attr_uint = attachments
sql_attr_bool = deleted
sql_query_killlist = SELECT `id` FROM `metadata` WHERE `deleted`=1
}
source tag
{
type = mysql