Exceeding max connections and crashing

#1

Hi, we have severe problems with ObjectDB crashing frequently. We can’t find the exact cause but we suspect several things.
We use 2.5.3_03 version and we use it in production. The same setup in test environment hasn’t have these kind of problems
First crash occurred when network went down and database lost connection with the JBOSS AS, several restarts got it up and running finally.  It seems when the database loses network connection it shutdowns but we cant be sure.

Usualy database stops once a day with no apperent reason.

Second cause we suspect is the number of network connections to the database, initial count was 500 but it wasn’t enough and we increased it to 5000 but after that system performance degraded significantly. It started to crash less frequently
Q1. Is it necessary to implement closing of connection after every commit we make by the user?
Q2. Our JBOSS AS frequently exceeds heap memory limit, could this cause problems with DB
Q3. Is there any command to check if the database is running from command prompt?

Did anyone had similar problems

Thnaks.

#2

First answers to your questions:

  1. No need to close the connection (i.e. close the EntityManager) after every commit, although it is a common technique to use connection per request (EntityManager per request). However, if you do not close the connection you must make sure that it will be reused.
  2. Unfortunately Out of memory errors may have severe impact on ObjectDB. You must make sure the heap is large enough and avoid it.
  3. There is no special command for checking if the database is running, but you can try to connect to the database from any Java console program using ordinary JPA, and see if it is running and functional.

Regarding the issue that you have, according to your report, it could be the result of exceeding the maximum number of connections, maybe because new connections are created but not closed. It may also be the result of limited heap size and out of memory errors.

Try to repair these 2 issues on your side, and if you still see the problem please report again.

ObjectDB Support
#3

1. we currently reuse connections. Is there a way to see how many connections are active on ObjectDB. When we set logging to one of logging levels log doesn’t show anything.
2. We increased hype size to 6GB and since that we haven’t have any crashes of JBOSS. Important to note is that JBOSS is not on the same server as ObjectDB.
After we increased heap size and number of connections 2 days ago we didn’t had any ObjectDB crashes.

Thanks for your help

#4

To see the number of connections, run the following:

> java com.objectdb.server dump

You have to run it on the machine on which the ObjectDB server is running.

ObjectDB Support

Reply