Changeset: 661b44eaf732 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/661b44eaf732
Modified Files:
tools/merovingian/client/monetdb.1
tools/merovingian/daemon/forkmserver.c
tools/merovingian/utils/properties.c
Branch: default
Log Message:
Implemented an "idletimeout" setting in the monetdb program.
diffs (55 lines):
diff --git a/tools/merovingian/client/monetdb.1
b/tools/merovingian/client/monetdb.1
--- a/tools/merovingian/client/monetdb.1
+++ b/tools/merovingian/client/monetdb.1
@@ -451,6 +451,14 @@ Defines how the server interprets litera
.IR mserver5 (1)
manpage for more details.
.TP
+\fBidletimeout=\fP\fIseconds\fP
+Set the idle timeout of the server.
+If a connection is idle for longer than the specified timeout, and it
+has a transaction open, the connection will be closed.
+See the
+.IR mserver5 (1)
+manpage for more details.
+.TP
\fBloadmodules=\fP\fImodule-list\fP
Enable the modules in
.I module-list
diff --git a/tools/merovingian/daemon/forkmserver.c
b/tools/merovingian/daemon/forkmserver.c
--- a/tools/merovingian/daemon/forkmserver.c
+++ b/tools/merovingian/daemon/forkmserver.c
@@ -217,6 +217,7 @@ forkMserver(const char *database, sabdb*
char pipeline[512];
char memmaxsize[64];
char vmmaxsize[64];
+ char idletout[64];
char *dbextra = NULL;
char *dbtrace = NULL;
char *mserver5_extra = NULL;
@@ -621,6 +622,14 @@ forkMserver(const char *database, sabdb*
argv[c++] = "--set=raw_strings=true";
}
+ kv = findConfKey(ckv, "idletimeout");
+ if (kv->val == NULL)
+ kv = findConfKey(_mero_db_props, "idletimeout");
+ if (kv->val != NULL) {
+ snprintf(idletout, sizeof(tabthreads), "--set=idle_timeout=%s",
kv->val);
+ argv[c++] = idletout;
+ }
+
/* get the rest (non-default) mserver props set in the conf file */
list = ckv;
freec = c; /* following entries to
be freed */
diff --git a/tools/merovingian/utils/properties.c
b/tools/merovingian/utils/properties.c
--- a/tools/merovingian/utils/properties.c
+++ b/tools/merovingian/utils/properties.c
@@ -46,6 +46,7 @@ static const confkeyval _internal_prop_k
{"vmmaxsize", NULL, 0, INT},
{"raw_strings", NULL, 0, BOOLEAN},
{"loadmodules", NULL, 0, MODS},
+ {"idletimeout", NULL, 0, INT},
{ NULL, NULL, 0, INVALID}
};
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]