Up Prev Next
From: "Avis, Ed" <avised at kbcfp dot com>
Subject: RE: Feature request: set maximum number of connections
Date: Jan 27 2004 8:46AM
Michael Peppler wrote:
>>I can see that the way to change this is to define MAX_CONNECT in
>>dbdimp.c. It would be useful to set this limit from Perl somehow.
>>I looked at the code, but I can't see where syb_init() is being
>syb_init() is called when the XS boot loader is called (i.e. when
>DBD::Sybase is "use'd", usually by DBI).
Ah, I see how this works:
#define dbd_init syb_init
>Care to think of ways that the syb_init() function could get this
>value (consider how it gets the hostname, for example).
I don't know if it has to be set in syb_init(). Perhaps ctlib will
be happy to set it later, although before opening the first
connection. If not, perhaps you'd need something like
$DBD::Sybase::max_connections = 100;
# connect with DBI as normal
I wouldn't want to put the number into the DBI connection string since
it is a property of the whole DBD::Sybase library, not one handle.