From 6e4d8af18923ec4873d96228ccf24eda3da4577e Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Sun, 17 Mar 2013 19:41:36 +0100 Subject: db: store data in memory during database downtime This patch is adding a mechanism to store query in a backlog build in memory. This allow to store events during downtime in memory and realize the effective insertion when the database comes back. A memory cap is used to avoid any memory flooding. --- ulogd.conf.in | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ulogd.conf.in') diff --git a/ulogd.conf.in b/ulogd.conf.in index f4f63d9..3e5e648 100644 --- a/ulogd.conf.in +++ b/ulogd.conf.in @@ -207,6 +207,13 @@ user="nupik" table="ulog" pass="changeme" procedure="INSERT_PACKET_FULL" +# backlog configuration: +# set backlog_memcap to the size of memory that will be +# allocated to store events in memory if data is temporary down +# and insert them when the database came back. +#backlog_memcap=1000000 +# number of events to insert at once when backlog is not empty +#backlog_oneshot_requests=10 [mysql2] db="nulog" @@ -224,6 +231,8 @@ table="ulog" #schema="public" pass="changeme" procedure="INSERT_PACKET_FULL" +#backlog_memcap=1000000 +#backlog_oneshot_requests=10 [pgsql2] db="nulog" -- cgit v1.2.3