-
My collegue Ryan discovered that data_repo.getPreparedStatement in the getUserUID method never returns on Windows if the database is down.. where as in
Linux this just returns a null.. which then causes the NPE at the synchronized statement.
This still does not sort Why our server was not reconnecting.
-
Tested it with current master branch and Tigase seems to reconnect correctly every time MySQL is down and up. I run a test for several minutes with 20 users trying to login and disconnecting every 5 seconds. I stopped MySQL several times during the test and started it again and Tigase connected back to the DB every time without any delay.
So, this is either the problem which I cannot replicate or the new code is working differently from the version reported to have a problem.
For the nid =
1 problemI cannot find a solution. I do not know why this happens in the first place, it should not happen but it does. Hence I cannot provide a solution at this time.
Type |
Bug
|
Priority |
Normal
|
Assignee | |
RedmineID |
940
|
Version |
tigase-server-5.2.0
|
Estimation |
0
|
In some cases the Tigase does not reconnect to the database and throws NPE instead. It might be related to a prolonged network outage or concurrent access to prepared statements...
bq. ??So I can reproduce the NPE by just disconnecting the DB and doing some logins. The problem there is that you synchronize on a preparedStatement that cannot be returned because there’s no connection. Generally, just confusing getting the NPE when perhaps it would be better getting a connection problem. So that’s a bit of a red herring. However.. The precipitating factor is that IT CANNOT get a connection… ??
?? here’s a trace ??
??Here’s it still having problems much later… (eg.. 7 HOURS LATER??
??--à Some other problems of interest.. Key issues when adding Offline messages.??
??Here’s another issue I don’t believe is related to the JDBC reconnect problem.. HOWEVER.. it Is trying to inject Offline messages to a -1 nid which causes an out of range exception:??
??And an error on the get??