[Mono-devel-list] Initial connection pool in Npgsql
Francisco Figueiredo Jr.
fxjrlists at yahoo.com.br
Sat Jan 17 13:15:39 EST 2004
Hi all,
I just updated some code on both gborg and mono cvs to add some initial
connection pool for Npgsql.
This code also has many patches from Pedro Martinez about command
builder. Thanks Pedro.
To use connection pool, you have to provide the following info in the
connection string:
MinPoolSize and MaxPoolSize.
For now, just the MinPoolSize is being used and just as a flag to use
connection pool.
Please, grab the latest code and give it a try and let me know if you
get any problems.
WARNING: There is only a drawback in this new connection pool code:
you will start to get some logs in server about unexpected EOF:
LOG: unexpected EOF on client connection
This is because when I open the connection in pool, when client closes
the connection it is put back in pool. If client closes the connection
and exits, there is no way I can go and release the connection. So the
unmanaged socket is closed without sending the 'X' message to server and
it thinks the connection was dropped and logs the message.
In all my tests I didn't find any problems with this approach. Please,
also, let me know if you find any problems with that.
--
Regards,
Francisco Figueiredo Jr.
Membro Fundador do Projeto MonoBrasil - MonoBrasil Project Founding Member
-------------
"Science without religion is lame;
religion without science is blind."
~ Albert Einstein
More information about the Mono-devel-list
mailing list