|| > I had written a database pool last year which got around this problem by ||| > keeping track of the last time the connection was released. Then the ||| > ping was only made if that time was greater than 5 seconds. This made a ||| > big difference by cutting the pings down to nil when the application is ||| > heavily loaded. The thinking is that when the queries are spaced close ||| > together, the fact that the previous query was successful gives the same ||| > information as the ping would, so it is not necessary. ||| ||| I would have thought that pinging the connection when it was idle would be ||| preferable to pinging it just before it was needed (when you have less time ||| to create a new one), and if it is busy then that is the best time to reduce ||| unnecessary traffic.
I think you misunderstood. His pool does exactly what you describe: pings when the connection is idle (last use time > 5 seconds ago) and does not ping when it is busy (last use time < 5 seconds ago). So, no unnecessary pinging traffic when the connections are busy. If you or others are interested we can contribute the code. Ryan -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
