summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--doc/queue_parameters.html9
-rw-r--r--runtime/queue.c20
3 files changed, 23 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 59a6e2a7..9a56e5f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
Version 7.4.7 [v7.4-stable] 2013-11-??
+- improved checking of queue config parameters on startup
- bugfix: call to ruleset with async queue did not use the queue
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=443
---------------------------------------------------------------------------
diff --git a/doc/queue_parameters.html b/doc/queue_parameters.html
index f2af7598..0237a475 100644
--- a/doc/queue_parameters.html
+++ b/doc/queue_parameters.html
@@ -16,7 +16,14 @@ default values will be used. Thus, the default ruleset has only the default main
queues are not set up by default.</p>
<ul>
<li><strong>queue.filename</strong> name</li>
- <li><strong>queue.size</strong> number</li>
+ <li><strong>queue.size</strong> number <br>
+ This is the maximum size of the queue in number of messages.
+ Note that setting the queue size to very small values (roughly
+ below 100 messages) is not supported and can lead to
+ unpredictable results.<br>
+ For more information on the current status of this restriction
+ see the <a href="http://www.rsyslog.com/lower-bound-for-queue-sizes/">rsyslog
+ FAQ: "lower bound for queue sizes"</a>.</li>
<li><strong>queue.dequeuebatchsize</strong> number
<br>default 16</li>
<li><strong>queue.maxdiskspace</strong> number</li>
diff --git a/runtime/queue.c b/runtime/queue.c
index db205fed..989b29ca 100644
--- a/runtime/queue.c
+++ b/runtime/queue.c
@@ -2095,16 +2095,24 @@ qqueueStart(qqueue_t *pThis) /* this is the ConstructionFinalizer */
break;
}
- if(pThis->iFullDlyMrk == -1)
+ if(pThis->iMaxQueueSize < 100) {
+ errmsg.LogError(0, RS_RET_OK_WARN, "Note: queue.size=\"%d\" is very "
+ "low and can lead to unpredictable results. See also "
+ "http://www.rsyslog.com/lower-bound-for-queue-sizes/",
+ pThis->iMaxQueueSize);
+ }
+
+ /* we need to do a quick check if our water marks are set plausible. If not,
+ * we correct the most important shortcomings.
+ */
+ if(pThis->iFullDlyMrk == -1 || pThis->iFullDlyMrk > pThis->iMaxQueueSize)
pThis->iFullDlyMrk = pThis->iMaxQueueSize
- (pThis->iMaxQueueSize / 100) * 3; /* default 97% */
- if(pThis->iLightDlyMrk == -1)
+ if(pThis->iLightDlyMrk == -1 || pThis->iLightDlyMrk > pThis->iMaxQueueSize)
pThis->iLightDlyMrk = pThis->iMaxQueueSize
- (pThis->iMaxQueueSize / 100) * 30; /* default 70% */
-
- /* we need to do a quick check if our water marks are set plausible. If not,
- * we correct the most important shortcomings. TODO: do that!!!! -- rgerhards, 2008-03-14
- */
+ if(pThis->iDeqBatchSize > pThis->iMaxQueueSize)
+ pThis->iDeqBatchSize = pThis->iMaxQueueSize;
/* finalize some initializations that could not yet be done because it is
* influenced by properties which might have been set after queueConstruct ()