activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Boothe [WCG]" <>
Subject KahaDB log files not getting cleaned up -- Why?
Date Fri, 13 Dec 2013 16:27:33 GMT

I have an ActiveMQ instance that has been running nicely for a couple of months, but doesn't
seem to clean up its KahaDB logs like I expect it to. (More specifically, I expect to have
like 1 log file, but in reality I have ~1500 log files with 49G of data.)

ActiveMQ has processed about 12M messages over the past couple of months, and has roughly
106K messages currently pending (in DLQs):


Given the number of messages currently pending, I would not expect the KahaDB logs to be very
big. In reality, they're about 49G:

$ cd apache-activemq-5.8.0/data/kahadb/
$ ls -lht | head
total 49G
-rw-rw-r-- 1 ubuntu ubuntu  32M Dec 13 16:00 db-1562.log
-rw-rw-r-- 1 ubuntu ubuntu  36M Dec 13 16:00
-rw-rw-r-- 1 ubuntu ubuntu 173K Dec 13 16:00 db.redo
-rw-rw-r-- 1 ubuntu ubuntu  33M Dec 13 14:47 db-1561.log
-rw-rw-r-- 1 ubuntu ubuntu  33M Dec 13 13:28 db-1560.log
-rw-rw-r-- 1 ubuntu ubuntu  33M Dec 13 12:09 db-1559.log
-rw-rw-r-- 1 ubuntu ubuntu  33M Dec 13 10:55 db-1558.log
-rw-rw-r-- 1 ubuntu ubuntu  33M Dec 13 09:48 db-1557.log
-rw-rw-r-- 1 ubuntu ubuntu  33M Dec 13 08:40 db-1556.log

Based on the maximum log ID, almost none of the log files appear to have been cleaned up:

$ ls db-*.log | wc
   1540    1540   17421

I'm using ActiveMQ 5.8.0. The only change I've made to the vanilla configuration is Java heap
size, which shouldn't affect whether or not DB log files get cleaned up (AFAIK). I'm "connecting"
to ActiveMQ with Camel. Obviously from the number of queues, I have several different workflows
in flight, but here's a representative example of how I'm using ActiveMQ in my Java code:


                    .bean(new LinkExtract())


                    .filter(new LinkHandled(jdbcConnectionString))


The only problems I'm seeing in my activemq.log file appear to be "normal." I get rashes of
transport exceptions every few weeks, which I have associated (rightly or wrongly) with hitting
the web admin interface. Given the infrequency and nature of the errors, I don't think they
explain why the logs wouldn't be deleted. In case it's useful, though, here are a couple of
representative lines from the log file:

2013-12-13 09:46:52,269 | WARN  | Transport Connection to: tcp:// failed: org.apache.activemq.transport.InactivityIOException:
Channel was inactive for too (>30000) long: tcp:// |
| ActiveMQ InactivityMonitor Worker
2013-12-13 14:43:41,215 | WARN  | Transport Connection to: tcp:// failed:
| | ActiveMQ Transport: tcp:///

Given the use case — very simple message processing using Camel — and ActiveMQ's vanilla
configuration, I would expect the log files to be tiny. Clearly, though they're not. Does
anyone have any idea why those files aren't getting deleted? I'm sure I'm doing (or not doing)
something very silly, but after pouring over the logs and documentation, I just can't figure
out what I'm doing wrong. Does anyone have an idea why my logs wouldn't be getting cleaned

Thanks everyone in advance for your attention and help! And thank you ActiveMQ devs for such
a wonderful product! :)

Andy Boothe

  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message