[Freeswitch-users] Freeswitch DBH - Possible to create connection pool to other DBs?

Alan Frisch frisch.alan at gmail.com
Thu May 26 19:23:13 MSD 2011


Steve,

Yeah I think the key might be the dbh:release() function.  Haven't
tested it yet, but rewrote my script so that it releases the DB
handles once the call is in progress.  Since the CDR/billing is
handledby XML CDR no need to keep a handle on the connection.

Will have to test it later and see how many connections get spawned.

AF.

On Thu, May 26, 2011 at 2:25 AM, Steven Ayre <steveayre at gmail.com> wrote:
> Not sure what you mean here...
>
> When a script runs it'll reuse a connection from the pool if there is one.
> If there isn't it'll open a new one.
>
> If you only every have one copy of your script running at a time you'll only
> get a single connection. But if you get 2 copies running at the same time
> you'll get 2, 3 copies 3 etc.
>
>
> -Steve
>
>
> On 26 May 2011 02:04, Alan Frisch <frisch.alan at gmail.com> wrote:
>>
>> Been playing with the DBH functionality in LUA.  The connection
>> pooling works great if you need to access the core DSN... but if you
>> need to access an external DB, it seems that FS will open a single
>> connection for the maximum number of concurrent calls accessing the
>> LUA script.
>>
>> In * one can limit the connection pool to any DB in res_odbc.conf...
>> but is there a way of doing this in FS?
>>
>> After a learning curve and lots of time, tthis is the one hangup in FS
>> that is preventing me from trashing * altogether.  Help me put * in
>> the dustbin for good!
>>
>> _______________________________________________
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>



More information about the FreeSWITCH-users mailing list