|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
unexpected closeHi all
I have a web service connected to postgresql. If i use the connections to the database and close them normaly i don't have any problem, but now i'm trying to use BasicDataBase class to pool the connections but when i close a connection to return it to the pool the postgresql log show this message :"unexpected EOF on client connection". What can i do to solve this problem? Thanks ______________________________________________ Enviado desde Correo Yahoo! La bandeja de entrada más inteligente. |
|
|
[dbcp] Re: unexpected closeOn Wed, May 14, 2008 at 1:34 PM, Adrián Cuartero
<adriancuartero@...> wrote: > Hi all > > I have a web service connected to postgresql. If i use the connections to the database and close them normaly i don't have any problem, but now i'm trying to use BasicDataBase class to pool the connections but when i close a connection to return it to the pool the postgresql log show this message :"unexpected EOF on client connection". > > What can i do to solve this problem? What version of DBCP are you using and what version of the postgres driver? Also, can you share the code that a) uses BasicDataSource (I assume that is what you mean) to get the connection and b) closes it? Are you running inside Tomcat or another app server or are you setting up the pool yourself? If the latter, are you closing the pool? Phil --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
|
|
|
Re: [dbcp] Re: unexpected closeAre you sure the errors are being reported for each connection close,
or are they just being reported when the app shuts down? If the latter, issueing bds.close() as part of application shutdown should address the problem. BasicDataSource does not close physical connections when they are returned to the pool, so if your app never invokes close on the BasicDataSource itself, the connections will be abandoned on the client (DBCP) side when the app shuts down. This does not cause postgres to leak connections, since the client is dropping the connection, but you see the message in the logs indicating that a connection has been dropped. To get rid of the error message, you need to get DBCP to close the underlying physical connections. BasicDataSource's close method does that. Phil --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
| Free Forum Powered by Nabble | Forum Help |