8

I am getting this issue from long time. If Neo4j transaction is not closed properly (committed or rollback) (This can happen because of Exceptions, Or die/exit in the middle of transaction, etc), then Neo4j doesn't release lock.

For resolving that I need to stop Neo4j and start Neo4j again. That should not be required.

I check at Server Configurations It is having one config org.neo4j.server.transaction.timeout=60 which say default is 60 seconds. So if this setting works for me by default, then by 60 seconds timeout should have happened.

How to check Database is locked up or not? How to avoid or remove database lock easily with code or configurations? I am using latest Neo4j 2.2.3.

Somnath Muluk
  • 55,015
  • 38
  • 216
  • 226
  • Perhaps you can explain how you use Neo4j? Which drivers and APIs? – Michael Hunger Jul 10 '15 at 14:02
  • 1
    I have it never seen becoming locked up. Usually if you handle transactions from java-code yourself, just make sure to use try-with-resource so that each tx is closed properly. – Michael Hunger Jul 10 '15 at 14:03
  • @MichaelHunger: I am using [PHP] language. I use try catch block in PHP and rollback transaction in catch. Is there anything I should do? – Somnath Muluk Jul 13 '15 at 09:44

1 Answers1

4

You need to doublecheck if the driver that you're using is working with the transactional Cypher endpoint. The timeout only applies to that one.

So my suspicion is that you're using the old cypher endpoint which is not aware of timeouts.

Stefan Armbruster
  • 39,465
  • 6
  • 87
  • 97
  • How to check which endpoint? I am using PHP and [Neo4j PHP library](https://github.com/jadell/neo4jphp). By this library, I am just adding cypher queries statements in transaction. – Somnath Muluk Jul 17 '15 at 08:00
  • 1
    look at the source luke ;-) Seriously: there is more than one php library for neo4j out there. – Stefan Armbruster Jul 17 '15 at 08:15