-
Notifications
You must be signed in to change notification settings - Fork 872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OGraphDatabasePool does not recover after Orientdb has been restarted #1448
Comments
The Test Code: public class PoolTester
} |
Hey, |
I hope you realized that this was just a copy/paste issue from me compressing the test code and not the actual problem? Did you run shutdown.bat and then server.bat halfway through the test (after ***** sleeping for 30 sec, stop and start Orientdb now! *****) without getting "WARNING: Connection re-acquired transparently after 1006ms and 2 ..." on every query thereafter? This is a serious performance killer when you run in a back-end server environment! |
Hi, WARNING: Connection re-acquired transparently after ... Is normal because probably you've multiple connection and the message happens per-connection. In production how many time you restart the OrientDB server? |
The answer is yes. And regarding restarting the OrientDB server in production; its enough if it happens once :P The back-end server should not have that kind of dependency to a database IMHO. The test only uses one connection and runs all the requests sequential, and is still not able to recover after 20 OGraphDatabasePool.global().acquire calls. I'm not that familiar with the internals of the pool but it looks to me like it is the same OGraphDatabase that is returned each time in the test. Shouldn't it have recovered after it encountered the error situation the first time? If it is not possible for the client API to recover from this situation it should throw an exception so that the programmer could deal with the issue in some way. |
This is fixed now. The output: giu 03, 2013 4:42:57 PM com.orientechnologies.orient.test.database.auto.PoolTester main |
Version:
orientdb-graphed-1.3.0 and orientdb-graphed-1.4.0-SNAPSHOT
Test:
20x Fetch connection from the OGraphDatabasePool and excute a command.
Stop and start Orientdb while the database pauses for 30 sec
20x Fetch connection from the OGraphDatabasePool and excute a command.
Expected result:
Should set up a new connection for each connection in the pool as soon as the disconnect is detected.
Actual result:
Continues to "re-acquire" a new connection for the same
2013-04-22 10:54:07,068 INFO main - start
2013-04-22 10:54:08,043 INFO main - #0 - 666652360
2013-04-22 10:54:08,064 INFO main - #1 - 666652360
...
2013-04-22 10:54:08,482 INFO main - #19 - 666652360
2013-04-22 10:54:08,497 INFO main - ***** sleeping for 30 sec, stop and start Orientdb now! *****
2013-04-22 10:54:38,499 INFO main - #0 - 666652360
22.apr.2013 10:54:39 com.orientechnologies.common.log.OLogManager log
WARNING: Connection re-acquired transparently after 677ms and 1 retries: no errors will be thrown at application level
2013-04-22 10:54:39,236 INFO main - #1 - 666652360
22.apr.2013 10:54:40 com.orientechnologies.common.log.OLogManager log
WARNING: Connection re-acquired transparently after 1010ms and 2 retries: no errors will be thrown at application level
...
2013-04-22 10:54:57,142 INFO main - #18 - 666652360
22.apr.2013 10:54:58 com.orientechnologies.common.log.OLogManager log
WARNING: Connection re-acquired transparently after 1009ms and 2 retries: no errors will be thrown at application level
2013-04-22 10:54:58,189 INFO main - #19 - 666652360
22.apr.2013 10:54:59 com.orientechnologies.common.log.OLogManager log
WARNING: Connection re-acquired transparently after 1011ms and 2 retries: no errors will be thrown at application level
2013-04-22 10:54:59,232 INFO main - done
The text was updated successfully, but these errors were encountered: