|
|
sybperl-l Archive
Up Prev Next
From: Francois Ochsenbein <francois at vizir dot u-strasbg dot fr>
Subject: Re: Feature request: set maximum number of connections
Date: Jan 27 2004 11:58AM
>
>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
>>>called.
>>
>>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
>
> require DBD::Sybase;
> $DBD::Sybase::max_connections = 100;
> use DBI;
> # 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.
>
Yep, this is a parameter to set via sp_configure
(or the SYBASE,cfg file, parameter "number of user connections "),
and reconfigure or restart the server...
================================================================================
Francois Ochsenbein ------ Observatoire Astronomique de Strasbourg
11, rue de l'Universite F-67000 STRASBOURG Phone: +33-(0)390 24 24 29
Email: francois@astro.u-strasbg.fr (France) Fax: +33-(0)390 24 24 32
================================================================================
|