From: Nathan Bird Date: Mon, 5 Jan 2009 19:18:42 +0000 (-0500) Subject: Modified pool.lisp:acquire-from-conn-pool to perform connection X-Git-Tag: v5.0.5~8^2^2~13 X-Git-Url: http://git.kpe.io/?a=commitdiff_plain;h=6f6e687a1a642b26d42f82b6f4b9bb5e65343fa3;hp=6f6e687a1a642b26d42f82b6f4b9bb5e65343fa3;p=clsql.git Modified pool.lisp:acquire-from-conn-pool to perform connection validity checks on all returned connections. Pooled connections can become invalid whenever the pipe goes down, (such as db reboot). Where possible use a reset command against the DB, otherwise we do a simple 'SELECT 1;' on the connection and catch any errors that occur, disconnecting the connection if it is no longer valid. Several databases have reset commands that also reset connection variables back to their database defaults leading to more consistent behavior from a new connection. * mssql - sp_reset_connection * postgres - "RESET ALL" Also introduced clsql-sys:*db-pool-max-free-connections* which is a heuristic threshold for when to disconnect a connection rather than returning it to the pool. ---