J.M. wrote: > On Fri, Aug 22, 2008 at 7:41 PM, Tilghman Lesher > <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > On Thursday 21 August 2008 10:08:53 J.M. wrote: > > I am running Asterisk 1.4.21.2 <http://1.4.21.2> with Realtime. > I have a phone setup in the > > database and when I connect that phone to Asterisk there are > suddenly an > > endless number of "SELECT * FROM sip WHERE name = '1001' AND host = > > 'dynamic'" queries being run. The only way to stop the flood of > queries > > coming from Asterisk to restart the Asterisk process. Even > disconnecting > > the phone doesn't stop Asterisk from running the queries. > > > > Has anyone seen this before? Why would Asterisk do that and > does anyone > > know the fix? > > Asterisk does that because realtime data is not cached by default, > so for each > access of the peer in question, Asterisk needs to reload the data > on the peer > from the database. If you'd like, turn on rtcachefriends in > sip.conf, which > will cache the peer for the duration of the registration interval > (or whatever > you have rtexpire set to). Also, to get correct behavior on > reload, you'll > need to have rtupdate turned on. Some of the behavior isn't quite > right in > 1.4.21.2 <http://1.4.21.2>, even, but it should be fixed once > 1.4.22 is released. > > BTW, I would otherwise have responded sooner, but I am on vacation > this week, > and I am not responding to email as quickly as I would usually. > > > Another way, which has worked so far for me, is to set the "qualify" > field in the "sip" table (or whatever you called the table that > corresponds to the sip.conf file) to "no". I found this out from > reading the following URL: > http://www.asteriskguru.com/tutorials/peer_is_now_unreachable.html > > If this continues to work it has the advantages of putting as little > in the .conf files as is possible and keeping the real-time feel of > using a database without having to worry about whether the cache is > updated or not. > > jm Ok, but WHY is he getting an "ENDLESS" # of selects. Sure * needs to get the data, but unless he had an ENDLESS series of CALLS to/from that phone should * be making all those queries ??
and HOW is this going to scale up ? _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2008 - September 22 - 25 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
