Re: [Freeswitch-dev] odbc连接过多的问题
Developers using git HEAD. Did you tested the HEAD version on your box? 在 2010年7月1日 下午3:56,王洪永 写道: > > hi ,what is your freeswitch version? The revised test is normal I > > 王洪永 > 中企开源-IP通讯部 > 北京中企开源信息技术有限公司 > 电话:58022020-212 > MSN:[email protected] > E-mail:[email protected] > Tue, 29 Jun 2010 11:59:45 -0500 > > > ___ > FreeSWITCH-dev mailing list > [email protected] > http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev > http://www.freeswitch.org > -- Blog: http://www.dujinfang.com Proj: http://www.freeswitch.org.cn ___ FreeSWITCH-dev mailing list [email protected] http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
Re: [Freeswitch-dev] odbc连接过多的问题
hi ,what is your freeswitch version? The revised test is normal I 王洪永 中企开源-IP通讯部 北京中企开源信息技术有限公司 电话:58022020-212 MSN:[email protected] E-mail:[email protected] Tue, 29 Jun 2010 11:59:45 -0500 ___ FreeSWITCH-dev mailing list [email protected] http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
Re: [Freeswitch-dev] odbc连接过多的问题
Tony committed a new method that allows a hybrid mode for the connection
pool. This is now used by mod_db (thus db backend for limit) and cidlookup.
I'll convert lcr over to it too.
This should help with connection counts for database handle usage that
doesn't need thread affinity.
2010/6/29 Anthony Minessale
> it's wrong.
>
> That patch breaks things horribly I tested it.
> I forgot that the flag is only cleared when the thread who created it,
> exits.
>
> The point is to keep the db connection dedicated to that thread until it
> exits.
> if the total connections run out it may be due to mod_limit and postgres
> only having 100 connections as the default.
>
>
>
> 2010/6/28 夏青
>
> Following is the translation from Chinese:
>>
>> We found a problem when testing Freeswitch version 1.0.19, it will create
>> too many ODBC connections, and lead to unable create new connection. It
>> should be caused by following function that flag was not removed.
>>
>> SWITCH_DECLARE(void)
>> switch_cache_db_release_db_handle(switch_cache_db_handle_t ** dbh) {
>> if(dbh && *dbh)
>> {
>> switch_clear_flag(*dbh, CDF_INUSE); //remove INUSE flag
>> switch_mutex_unlock((*dbh)->mutex);
>> *dbh = NULL;
>>}
>> }
>>
>> -Original Message-
>> From: [email protected] [mailto:
>> [email protected]] On Behalf Of Seven Du
>> Sent: Tuesday, June 29, 2010 7:43 AM
>> To: [email protected]
>> Subject: Re: [Freeswitch-dev] odbc连接过多的问题
>>
>> agree with mrene that the google translation is horrible in this case.
>>
>> 2010/6/29 Anthony Minessale :
>> > turns out that change is horrible.
>> > i think his problem is he needs more connections because that change
>> > really messes things up
>> >
>> > 2010/6/28 Mathieu Rene
>> >>
>> >> I guess the source was easier to read than the google translation
>> >> anyways Mathieu Rene Avant-Garde Solutions Inc
>> >> Office: + 1 (514) 664-1044 x100
>> >> Cell: +1 (514) 664-1044 x200
>> >> [email protected]
>> >>
>> >>
>> >>
>> >> On 2010-06-28, at 9:50 AM, EdPimentl wrote:
>> >>
>> >> This is what he said:
>> >>
>> >> In the test FREEESWITCH
>> >> 1.0.19 version of the time found a problem, too much can cause odbc
>> >> connection, leading to not create a new connection problem. Find the
>> >> code found in the following function should be connected without
>> >> removing the logo.
>> >>
>> >>
>> >> SWITCH_DECLARE (void)
>> >> switch_cache_db_release_db_handle (switch_cache_db_handle_t ** dbh) (
>> >> if (dbh & & * dbh) ( switch_clear_flag (* dbh, CDF_INUSE); / / get
>> >> rid of using the state flag switch_mutex_unlock ((* dbh) -> mutex);
>> >> * Dbh = NULL;
>> >> )
>> >> )
>> >>
>> >>
>> >> -E
>> >> Gpro.ws
>> >>
>> >>
>> >> ___
>> >> FreeSWITCH-dev mailing list
>> >> [email protected]
>> >> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>> >> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-de
>> >> v
>> >> http://www.freeswitch.org
>> >>
>> >>
>> >> ___
>> >> FreeSWITCH-dev mailing list
>> >> [email protected]
>> >> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>> >> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-de
>> >> v
>> >> http://www.freeswitch.org
>> >>
>> >
>> >
>> >
>> > --
>> > Anthony Minessale II
>> >
>> > FreeSWITCH http://www.freeswitch.org/
>> > ClueCon http://www.cluecon.com/
>> > Twitter: http://twitter.com/FreeSWITCH_wire
>> >
>> > AIM: anthm
>> > MSN:[email protected]
>> > GTALK/JABBER/PAYPAL:[email protected]
>> > IRC: irc.freenode.net #freeswitch
>> >
>> > FreeSWITCH Developer Conference
>> > sip:[email protected]
>> > googletalk:[email protected]
>> > pstn:+19193869900
>> >
>> &
Re: [Freeswitch-dev] odbc连接过多的问题
it's wrong.
That patch breaks things horribly I tested it.
I forgot that the flag is only cleared when the thread who created it,
exits.
The point is to keep the db connection dedicated to that thread until it
exits.
if the total connections run out it may be due to mod_limit and postgres
only having 100 connections as the default.
2010/6/28 夏青
> Following is the translation from Chinese:
>
> We found a problem when testing Freeswitch version 1.0.19, it will create
> too many ODBC connections, and lead to unable create new connection. It
> should be caused by following function that flag was not removed.
>
> SWITCH_DECLARE(void)
> switch_cache_db_release_db_handle(switch_cache_db_handle_t ** dbh) {
> if(dbh && *dbh)
> {
> switch_clear_flag(*dbh, CDF_INUSE); //remove INUSE flag
> switch_mutex_unlock((*dbh)->mutex);
> *dbh = NULL;
>}
> }
>
> -Original Message-
> From: [email protected] [mailto:
> [email protected]] On Behalf Of Seven Du
> Sent: Tuesday, June 29, 2010 7:43 AM
> To: [email protected]
> Subject: Re: [Freeswitch-dev] odbc连接过多的问题
>
> agree with mrene that the google translation is horrible in this case.
>
> 2010/6/29 Anthony Minessale :
> > turns out that change is horrible.
> > i think his problem is he needs more connections because that change
> > really messes things up
> >
> > 2010/6/28 Mathieu Rene
> >>
> >> I guess the source was easier to read than the google translation
> >> anyways Mathieu Rene Avant-Garde Solutions Inc
> >> Office: + 1 (514) 664-1044 x100
> >> Cell: +1 (514) 664-1044 x200
> >> [email protected]
> >>
> >>
> >>
> >> On 2010-06-28, at 9:50 AM, EdPimentl wrote:
> >>
> >> This is what he said:
> >>
> >> In the test FREEESWITCH
> >> 1.0.19 version of the time found a problem, too much can cause odbc
> >> connection, leading to not create a new connection problem. Find the
> >> code found in the following function should be connected without
> >> removing the logo.
> >>
> >>
> >> SWITCH_DECLARE (void)
> >> switch_cache_db_release_db_handle (switch_cache_db_handle_t ** dbh) (
> >> if (dbh & & * dbh) ( switch_clear_flag (* dbh, CDF_INUSE); / / get
> >> rid of using the state flag switch_mutex_unlock ((* dbh) -> mutex);
> >> * Dbh = NULL;
> >> )
> >> )
> >>
> >>
> >> -E
> >> Gpro.ws
> >>
> >>
> >> ___
> >> FreeSWITCH-dev mailing list
> >> [email protected]
> >> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> >> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-de
> >> v
> >> http://www.freeswitch.org
> >>
> >>
> >> ___
> >> FreeSWITCH-dev mailing list
> >> [email protected]
> >> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> >> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-de
> >> v
> >> http://www.freeswitch.org
> >>
> >
> >
> >
> > --
> > Anthony Minessale II
> >
> > FreeSWITCH http://www.freeswitch.org/
> > ClueCon http://www.cluecon.com/
> > Twitter: http://twitter.com/FreeSWITCH_wire
> >
> > AIM: anthm
> > MSN:[email protected]
> > GTALK/JABBER/PAYPAL:[email protected]
> > IRC: irc.freenode.net #freeswitch
> >
> > FreeSWITCH Developer Conference
> > sip:[email protected]
> > googletalk:[email protected]
> > pstn:+19193869900
> >
> > ___
> > FreeSWITCH-dev mailing list
> > [email protected]
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> > http://www.freeswitch.org
> >
> >
>
>
>
> --
> Blog: http://www.dujinfang.com
> Proj: http://www.freeswitch.org.cn
>
> ___
> FreeSWITCH-dev mailing list
> [email protected]
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>
>
Re: [Freeswitch-dev] odbc连接过多的问题
Following is the translation from Chinese:
We found a problem when testing Freeswitch version 1.0.19, it will create too
many ODBC connections, and lead to unable create new connection. It should be
caused by following function that flag was not removed.
SWITCH_DECLARE(void)
switch_cache_db_release_db_handle(switch_cache_db_handle_t ** dbh) {
if(dbh && *dbh)
{
switch_clear_flag(*dbh, CDF_INUSE); //remove INUSE flag
switch_mutex_unlock((*dbh)->mutex);
*dbh = NULL;
}
}
-Original Message-
From: [email protected]
[mailto:[email protected]] On Behalf Of Seven Du
Sent: Tuesday, June 29, 2010 7:43 AM
To: [email protected]
Subject: Re: [Freeswitch-dev] odbc连接过多的问题
agree with mrene that the google translation is horrible in this case.
2010/6/29 Anthony Minessale :
> turns out that change is horrible.
> i think his problem is he needs more connections because that change
> really messes things up
>
> 2010/6/28 Mathieu Rene
>>
>> I guess the source was easier to read than the google translation
>> anyways Mathieu Rene Avant-Garde Solutions Inc
>> Office: + 1 (514) 664-1044 x100
>> Cell: +1 (514) 664-1044 x200
>> [email protected]
>>
>>
>>
>> On 2010-06-28, at 9:50 AM, EdPimentl wrote:
>>
>> This is what he said:
>>
>> In the test FREEESWITCH
>> 1.0.19 version of the time found a problem, too much can cause odbc
>> connection, leading to not create a new connection problem. Find the
>> code found in the following function should be connected without
>> removing the logo.
>>
>>
>> SWITCH_DECLARE (void)
>> switch_cache_db_release_db_handle (switch_cache_db_handle_t ** dbh) (
>> if (dbh & & * dbh) ( switch_clear_flag (* dbh, CDF_INUSE); / / get
>> rid of using the state flag switch_mutex_unlock ((* dbh) -> mutex);
>> * Dbh = NULL;
>> )
>> )
>>
>>
>> -E
>> Gpro.ws
>>
>>
>> ___
>> FreeSWITCH-dev mailing list
>> [email protected]
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-de
>> v
>> http://www.freeswitch.org
>>
>>
>> ___
>> FreeSWITCH-dev mailing list
>> [email protected]
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-de
>> v
>> http://www.freeswitch.org
>>
>
>
>
> --
> Anthony Minessale II
>
> FreeSWITCH http://www.freeswitch.org/
> ClueCon http://www.cluecon.com/
> Twitter: http://twitter.com/FreeSWITCH_wire
>
> AIM: anthm
> MSN:[email protected]
> GTALK/JABBER/PAYPAL:[email protected]
> IRC: irc.freenode.net #freeswitch
>
> FreeSWITCH Developer Conference
> sip:[email protected]
> googletalk:[email protected]
> pstn:+19193869900
>
> ___
> FreeSWITCH-dev mailing list
> [email protected]
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>
>
--
Blog: http://www.dujinfang.com
Proj: http://www.freeswitch.org.cn
___
FreeSWITCH-dev mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
___
FreeSWITCH-dev mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
Re: [Freeswitch-dev] odbc连接过多的问题
agree with mrene that the google translation is horrible in this case. 2010/6/29 Anthony Minessale : > turns out that change is horrible. > i think his problem is he needs more connections because that change really > messes things up > > 2010/6/28 Mathieu Rene >> >> I guess the source was easier to read than the google translation anyways >> Mathieu Rene >> Avant-Garde Solutions Inc >> Office: + 1 (514) 664-1044 x100 >> Cell: +1 (514) 664-1044 x200 >> [email protected] >> >> >> >> On 2010-06-28, at 9:50 AM, EdPimentl wrote: >> >> This is what he said: >> >> In the test FREEESWITCH >> 1.0.19 version of the time found a problem, too much can cause odbc >> connection, leading to not create a new connection problem. Find the code >> found in the following function should be connected without removing the >> logo. >> >> >> SWITCH_DECLARE (void) >> switch_cache_db_release_db_handle (switch_cache_db_handle_t ** dbh) >> ( >> if (dbh & & * dbh) >> ( >> switch_clear_flag (* dbh, CDF_INUSE); / / get rid of using the state flag >> switch_mutex_unlock ((* dbh) -> mutex); >> * Dbh = NULL; >> ) >> ) >> >> >> -E >> Gpro.ws >> >> >> ___ >> FreeSWITCH-dev mailing list >> [email protected] >> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev >> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev >> http://www.freeswitch.org >> >> >> ___ >> FreeSWITCH-dev mailing list >> [email protected] >> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev >> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev >> http://www.freeswitch.org >> > > > > -- > Anthony Minessale II > > FreeSWITCH http://www.freeswitch.org/ > ClueCon http://www.cluecon.com/ > Twitter: http://twitter.com/FreeSWITCH_wire > > AIM: anthm > MSN:[email protected] > GTALK/JABBER/PAYPAL:[email protected] > IRC: irc.freenode.net #freeswitch > > FreeSWITCH Developer Conference > sip:[email protected] > googletalk:[email protected] > pstn:+19193869900 > > ___ > FreeSWITCH-dev mailing list > [email protected] > http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev > http://www.freeswitch.org > > -- Blog: http://www.dujinfang.com Proj: http://www.freeswitch.org.cn ___ FreeSWITCH-dev mailing list [email protected] http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
Re: [Freeswitch-dev] odbc连接过多的问题
turns out that change is horrible. i think his problem is he needs more connections because that change really messes things up 2010/6/28 Mathieu Rene > I guess the source was easier to read than the google translation anyways > > Mathieu Rene > Avant-Garde Solutions Inc > Office: + 1 (514) 664-1044 x100 > Cell: +1 (514) 664-1044 x200 > [email protected] > > > > > On 2010-06-28, at 9:50 AM, EdPimentl wrote: > > This is what he said: > > In the test FREEESWITCH > 1.0.19 version of the time found a problem, too much can cause odbc > connection, leading to not create a new connection problem. Find the code > found in the following function should be connected without removing the > logo. > > > SWITCH_DECLARE (void) > switch_cache_db_release_db_handle (switch_cache_db_handle_t ** dbh) > ( > if (dbh & & * dbh) > ( > switch_clear_flag (* dbh, CDF_INUSE); / / get rid of using the state flag > switch_mutex_unlock ((* dbh) -> mutex); > * Dbh = NULL; > ) > ) > > > -E > Gpro.ws > > > ___ > FreeSWITCH-dev mailing list > [email protected] > http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev > http://www.freeswitch.org > > > > ___ > FreeSWITCH-dev mailing list > [email protected] > http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev > http://www.freeswitch.org > > -- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:[email protected] GTALK/JABBER/PAYPAL:[email protected] IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:[email protected] googletalk:[email protected] pstn:+19193869900 ___ FreeSWITCH-dev mailing list [email protected] http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
Re: [Freeswitch-dev] odbc连接过多的问题
I guess the source was easier to read than the google translation anyways Mathieu Rene Avant-Garde Solutions Inc Office: + 1 (514) 664-1044 x100 Cell: +1 (514) 664-1044 x200 [email protected] On 2010-06-28, at 9:50 AM, EdPimentl wrote: > This is what he said: > > In the test FREEESWITCH > 1.0.19 version of the time found a problem, too much can cause odbc > connection, leading to not create a new connection problem. Find the code > found in the following function should be connected without removing the > logo. > > > SWITCH_DECLARE (void) > switch_cache_db_release_db_handle (switch_cache_db_handle_t ** dbh) > ( > if (dbh & & * dbh) > ( > switch_clear_flag (* dbh, CDF_INUSE); / / get rid of using the state flag > switch_mutex_unlock ((* dbh) -> mutex); > * Dbh = NULL; > ) > ) > > > -E > Gpro.ws > > > ___ > FreeSWITCH-dev mailing list > [email protected] > http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev > http://www.freeswitch.org ___ FreeSWITCH-dev mailing list [email protected] http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
Re: [Freeswitch-dev] odbc连接过多的问题
This is what he said: In the test FREEESWITCH 1.0.19 version of the time found a problem, too much can cause odbc connection, leading to not create a new connection problem. Find the code found in the following function should be connected without removing the logo. SWITCH_DECLARE (void) switch_cache_db_release_db_handle (switch_cache_db_handle_t ** dbh) ( if (dbh & & * dbh) ( switch_clear_flag (* dbh, CDF_INUSE); / / get rid of using the state flag switch_mutex_unlock ((* dbh) -> mutex); * Dbh = NULL; ) ) -E Gpro.ws ___ FreeSWITCH-dev mailing list [email protected] http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
Re: [Freeswitch-dev] odbc连接过多的问题
I don't understand the text but I understand the C code.
added to GIT 1a5b52e
2010/6/27 王洪永
> 在测试FREEESWITCH
> 1.0.19版本时候发现一个问题,会引起odbc过多连接,导致无法创建新连接问题。查找代码发现应该是下面的函数没有去掉连接的使用标志。
>
>
> SWITCH_DECLARE(void)
> switch_cache_db_release_db_handle(switch_cache_db_handle_t ** dbh)
> {
> if(dbh && *dbh)
> {
>switch_clear_flag(*dbh, CDF_INUSE); //去掉使用状态标志
>switch_mutex_unlock((*dbh)->mutex);
>*dbh = NULL;
> }
> }
>
>
>
> 王洪永
> 中企开源-IP通讯部
> Mon, 28 Jun 2010 09:18:52 +0800
>
>
> ___
> FreeSWITCH-dev mailing list
> [email protected]
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm
MSN:[email protected]
GTALK/JABBER/PAYPAL:[email protected]
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:[email protected]
googletalk:[email protected]
pstn:+19193869900
___
FreeSWITCH-dev mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
