Monitoring Pool Availability

Hi,


Could you suggest some pointers on how we could monitor the Pool availability on an XData server please.

We are experiencing a problem where the server stops responding to requests so would like to see if the Pool is running out of available Connections.

Thanks
Iain McWilliams

Hi Iain,

That's indeed an indication that something in memory is not being released and thus holding references to connections and not releasing it back to the pool. I'm not sure though what kind of monitoring you miss? If that's the case, it's something that must be investigated in your own code.
One thing you can use to see if it helps (and confirm connections are being hold) is to clean up the pool from time to time using this:


(Pool as TDBConnectionPool).CleanUp(300);


The above code will release back to the pool all connections that hasn't been references for 300 seconds. You can call this anywhere in your code from time to time.

Thanks Wagner,


I'll certainly look at that, but is it possible to access the number of Pool entries in use. I'm thinking of exposing an endpoint that returns the "In Use" figure which we could graph in PRTG. If we see that creeping up over time it implies we aren't cleaning up correctly or are failing to catch internal errors cleanly.

Thanks,
Iain

With current source code it's not possible as such information is private in class, but it's rather simple to implement it. Please contact us directly through e-mail and we can send you a source code patch to allow that.