On 11.08.10 10:42, Damian Hofmann wrote:
Hi Derby Community
Short question: Are disconnects supposed get logged if the option
"derby.drda.logConnections" is enabled? If not, how can I see if the
connections get properly closed?
Hi Damian,
I don't think disconnects are logged. I see two things you can do with
Derby currently:
o enable client side logging
o use JMX and look at the information provided by NetworkServer MBean [1]
I'm thinking the JMX approach is the easiest way to get a picture of the
situation in your network server (could use jconsole or visualvm).
If you would like to see logging of disconnects to derby.log, you should
file a request in Jira [2]. I expect the required changes to be small,
perhaps only adding tracing code to either DRDAConnThread.closeSession()
or Session.close().
Regards,
--
Kristian
[1] For testing it should be pretty simple to get started: just connect
to the network server process locally with
jconsole/visualvm/<your_favorite_jxm_tool>. In deployment you may need
to do some more work (see for instance
http://wiki.apache.org/db-derby/DerbyJMXQuickStart), especially for
remote access as well.
[2] https://issues.apache.org/jira/browse/DERBY
Background:
I recently had a problem with one of our Applications not responding
anymore. I suspected that the problem was with the derby network
server blocking because too many connections had been opened. In the
logfile tousands of connections are logged, but not a single
disconnect. So after I changed some code I excepted to see some
disconnects. But the logfile still only shows connects.
Now I do not know if ...
a) ... there has never been a problem with to many connections and I
have solved the wrong problem
b) ... my "solution" doesn't work
c) ... there was a problem with connections, my solution works, but
the logfile simply doesn't tell me that
Thanks for your help
Damian