title: Neo4j:2.2.3 : server fails to start after "Detected incorrectly shut down database, performing recovery"
body: <p>There was an unexpected shutdown of <strong>neo4j</strong> server apparently due to excess RAM usage (my VPS stats shows > 32 GB usage). Following which I tried to start the server. As it was taking too long, I stopped the process with Ctrl+C. I've tried starting it with console. I get the following error in messages.log</p>
  
  <pre><code>*"org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.Recovery@4dad40e0' failed to initialize. Please see attached cause exception."*
  org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.Recovery@4dad40e0' failed to initialize. Please see attached cause exception.
          at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:489) [neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:72) [neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:106) [neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:530) ~[neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507) [neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115) [neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataSourceManager.java:117) [neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507) [neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115) [neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:331) [neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.EmbeddedGraphDatabase.&lt;init&gt;(EmbeddedGraphDatabase.java:59) [neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.impl.recovery.StoreRecoverer.recover(StoreRecoverer.java:96) [neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.server.preflight.PerformRecoveryIfNecessary.run(PerformRecoveryIfNecessary.java:65) [neo4j-server-2.2.3.jar:2.2.3]
          at org.neo4j.server.preflight.PreFlightTasks.run(PreFlightTasks.java:71) [neo4j-server-2.2.3.jar:2.2.3]
          at org.neo4j.server.AbstractNeoServer.runPreflightTasks(AbstractNeoServer.java:399) [neo4j-server-2.2.3.jar:2.2.3]
          at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:195) [neo4j-server-2.2.3.jar:2.2.3]
          at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:117) [neo4j-server-2.2.3.jar:2.2.3]
          at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:69) [neo4j-server-2.2.3.jar:2.2.3]
  Caused by: java.lang.Error: Maximum lock count exceeded
          at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryAcquire(ReentrantReadWriteLock.java:403) ~[na:1.7.0_85]
          at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1197) ~[na:1.7.0_85]
          at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock(ReentrantReadWriteLock.java:945) ~[na:1.7.0_85]
          at org.neo4j.index.impl.lucene.LuceneDataSource.getWriteLock(LuceneDataSource.java:229) ~[neo4j-lucene-index-2.2.3.jar:2.2.3]
          at org.neo4j.index.impl.lucene.LuceneCommandApplier.visitIndexDefineCommand(LuceneCommandApplier.java:117) ~[neo4j-lucene-index-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.impl.transaction.command.NeoCommandHandler$Delegator.visitIndexDefineCommand(NeoCommandHandler.java:323) ~[neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.impl.api.LegacyIndexApplier.applier(LegacyIndexApplier.java:92) ~[neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.impl.api.LegacyIndexApplier.visitIndexRemoveCommand(LegacyIndexApplier.java:149) ~[neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.impl.api.CommandApplierFacade.visitIndexRemoveCommand(CommandApplierFacade.java:218) ~[neo4j-kernel-2.2.3.jar:2.2.3]
   at org.neo4j.kernel.impl.index.IndexCommand$RemoveCommand.handle(IndexCommand.java:253) ~[neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.impl.api.CommandApplierFacade.visit(CommandApplierFacade.java:82) ~[neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.impl.api.CommandApplierFacade.visit(CommandApplierFacade.java:45) ~[neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.impl.transaction.log.PhysicalTransactionRepresentation.accept(PhysicalTransactionRepresentation.java:69) ~[neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.impl.api.TransactionRepresentationStoreApplier.apply(TransactionRepresentationStoreApplier.java:108) ~[neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.impl.transaction.state.RecoveryVisitor.visit(RecoveryVisitor.java:70) ~[neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.impl.transaction.state.RecoveryVisitor.visit(RecoveryVisitor.java:36) ~[neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.impl.transaction.log.LogFileRecoverer.visit(LogFileRecoverer.java:54) ~[neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.impl.transaction.log.LogFileRecoverer.visit(LogFileRecoverer.java:32) ~[neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.Recovery.init(Recovery.java:72) ~[neo4j-kernel-2.2.3.jar:2.2.3]
          at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:483) [neo4j-kernel-2.2.3.jar:2.2.3]
          ... 17 common frames omitted
  </code></pre>
  
  <p>I noted that the error was <code>Caused by: java.lang.Error: Maximum lock count exceeded.</code> I'm not able to start the database. When I start in console mode is just says "<code>detected incorrectly shut down database, performing recovery..</code>" and concurrently above error in messages.log appears.
  If there is some manual cleanup possible in graph.db, please suggest.
  Any help is greatly appreciated.</p>