Hi, when presence module is running with subs_db_mode=3 it makes an excessive number of SQL select queries, litelly dozens per second:
Steps to reproduce: registers two subscribers in jitsi and add them to contact lists of each other. The kamailio version is 3.3.2. I'm not doing anything special configuration-wise:
loadmodule "presence.so" modparam("presence", "db_url", "mysql://kamailio:snbF93@localhost/kamailio") # in 3.3 the fallback2db change to subs_db_mode modparam("presence", "subs_db_mode", 3) modparam("presence", "notifier_processes", 3)
loadmodule "presence_xml.so" modparam("presence_xml", "db_url", "mysql://kamailio:snbF93@localhost/kamailio") modparam("presence_xml", "force_active", 0) modparam("presence_xml", "integrated_xcap_server", 1) # retry-after 5 minutes modparam("presence_xml", "xcapauth_userdel_reason", "probation;retry-after=300")
Q: it is a bug of a feature? :) Thanks. Andrew
This is by design. When you have many thousands of presence subscriptions you need to service them evenly across time instead of in big lumps.
If you don't want this behaviour then you can set the notifier_processes modparam to 0. But, if you do this you should consider not using subs_db_mode 3 as there are many race-hazards in presence that are fixed by using the notifier_processes.
Regards,
Peter
On Fri, 2012-11-09 at 12:01 +0100, Andrew Pogrebennyk wrote: