Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
5.3.2, 5.4.0, 5.4.1
-
None
-
Ubuntu Linux, activemq 5.3.2, master slave configuration with kahadb configured directory on a smb mount.
Description
The slave will output these messages:
INFO | Database /mnt/activemqdata/lock is locked... waiting 10 seconds for the database to be unlocked ......
After awhile, the messages change to:
INFO | Database /mnt/activemqdata/lock is locked... waiting 10 seconds for the database to be unlocked. Reason: java.io.FileNotFoundException: /mnt/activemq/lock (Too many open files) ....
Upon inspection of LockFile.lock(), OverlappingFileLockException is the only exception caught. In the event tryLock() throws IOException, as it does in
my case, the readFile isn't cleaned up and the caller (which catches IOExceptions), just iterates again.
Since javadoc says FileChannel.tryLock() throws an IOException, and the caller in this case, and MessageDatabase expects to catch IOExceptions, it
would seem like adding this to the code in LockFile.lock() should fix this issue.
catch (IOException e)
{
reason = e;
}