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.<div><br></div><div>This should help with connection counts for database handle usage that doesn't need thread affinity.<br>
<br><div class="gmail_quote">2010/6/29 Anthony Minessale <span dir="ltr"><<a href="mailto:anthony.minessale@gmail.com">anthony.minessale@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
it's wrong.<div><br></div><div>That patch breaks things horribly I tested it.</div><div>I forgot that the flag is only cleared when the thread who created it, exits.</div><div><br></div><div>The point is to keep the db connection dedicated to that thread until it exits.</div>
<div>if the total connections run out it may be due to mod_limit and postgres only having 100 connections as the default.</div><div><br></div><div><br><br><div class="gmail_quote">2010/6/28 夏青 <span dir="ltr"><<a href="mailto:xiaqing@hundsun.com" target="_blank">xiaqing@hundsun.com</a>></span><div>
<div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Following is the translation from Chinese:<br>
<br>
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.<br>
<div><br>
SWITCH_DECLARE(void)<br>
switch_cache_db_release_db_handle(switch_cache_db_handle_t ** dbh) {<br>
if(dbh && *dbh)<br>
{<br>
</div> switch_clear_flag(*dbh, CDF_INUSE); //remove INUSE flag<br>
<div> switch_mutex_unlock((*dbh)->mutex);<br>
</div> *dbh = NULL;<br>
<div><div></div><div> }<br>
}<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:freeswitch-dev-bounces@lists.freeswitch.org" target="_blank">freeswitch-dev-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-dev-bounces@lists.freeswitch.org" target="_blank">freeswitch-dev-bounces@lists.freeswitch.org</a>] On Behalf Of Seven Du<br>
Sent: Tuesday, June 29, 2010 7:43 AM<br>
To: <a href="mailto:freeswitch-dev@lists.freeswitch.org" target="_blank">freeswitch-dev@lists.freeswitch.org</a><br>
Subject: Re: [Freeswitch-dev] odbc连接过多的问题<br>
<br>
agree with mrene that the google translation is horrible in this case.<br>
<br>
2010/6/29 Anthony Minessale <<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>>:<br>
> turns out that change is horrible.<br>
> i think his problem is he needs more connections because that change<br>
> really messes things up<br>
><br>
> 2010/6/28 Mathieu Rene <<a href="mailto:mrene_lists@avgs.ca" target="_blank">mrene_lists@avgs.ca</a>><br>
>><br>
>> I guess the source was easier to read than the google translation<br>
>> anyways Mathieu Rene Avant-Garde Solutions Inc<br>
>> Office: + 1 (514) 664-1044 x100<br>
>> Cell: +1 (514) 664-1044 x200<br>
>> <a href="mailto:mrene@avgs.ca" target="_blank">mrene@avgs.ca</a><br>
>><br>
>><br>
>><br>
>> On 2010-06-28, at 9:50 AM, EdPimentl wrote:<br>
>><br>
>> This is what he said:<br>
>><br>
>> In the test FREEESWITCH<br>
>> 1.0.19 version of the time found a problem, too much can cause odbc<br>
>> connection, leading to not create a new connection problem. Find the<br>
>> code found in the following function should be connected without<br>
>> removing the logo.<br>
>><br>
>><br>
>> SWITCH_DECLARE (void)<br>
>> switch_cache_db_release_db_handle (switch_cache_db_handle_t ** dbh) (<br>
>> if (dbh & & * dbh) ( switch_clear_flag (* dbh, CDF_INUSE); / / get<br>
>> rid of using the state flag switch_mutex_unlock ((* dbh) -> mutex);<br>
>> * Dbh = NULL;<br>
>> )<br>
>> )<br>
>><br>
>><br>
>> -E<br>
>> Gpro.ws<br>
>><br>
>><br>
>> _______________________________________________<br>
>> FreeSWITCH-dev mailing list<br>
>> <a href="mailto:FreeSWITCH-dev@lists.freeswitch.org" target="_blank">FreeSWITCH-dev@lists.freeswitch.org</a><br>
>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-de" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-de</a><br>
>> v<br>
>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>><br>
>><br>
>> _______________________________________________<br>
>> FreeSWITCH-dev mailing list<br>
>> <a href="mailto:FreeSWITCH-dev@lists.freeswitch.org" target="_blank">FreeSWITCH-dev@lists.freeswitch.org</a><br>
>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-de" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-de</a><br>
>> v<br>
>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>><br>
><br>
><br>
><br>
> --<br>
> Anthony Minessale II<br>
><br>
> FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
> ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
> Twitter: <a href="http://twitter.com/FreeSWITCH_wire" target="_blank">http://twitter.com/FreeSWITCH_wire</a><br>
><br>
> AIM: anthm<br>
> <a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>
> GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
> IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br>
><br>
> FreeSWITCH Developer Conference<br>
> <a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br>
> <a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>
> pstn:+19193869900<br>
><br>
> _______________________________________________<br>
> FreeSWITCH-dev mailing list<br>
> <a href="mailto:FreeSWITCH-dev@lists.freeswitch.org" target="_blank">FreeSWITCH-dev@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
><br>
<br>
<br>
<br>
--<br>
Blog: <a href="http://www.dujinfang.com" target="_blank">http://www.dujinfang.com</a><br>
Proj: <a href="http://www.freeswitch.org.cn" target="_blank">http://www.freeswitch.org.cn</a><br>
<br>
_______________________________________________<br>
FreeSWITCH-dev mailing list<br>
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org" target="_blank">FreeSWITCH-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
_______________________________________________<br>
FreeSWITCH-dev mailing list<br>
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org" target="_blank">FreeSWITCH-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div></div></div><br><br clear="all"><br>-- <br><div class="im">Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire" target="_blank">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>
GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:+19193869900<br>
</div></div>
<br>_______________________________________________<br>
FreeSWITCH-dev mailing list<br>
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>-Rupa<br>
</div>