[Serusers] Voicemail config producing errors and zombies

Steve Blair blairs at isc.upenn.edu
Mon Sep 13 16:26:23 CEST 2004


Jeff:

   Did you set the set-variable = max_connections=500 in /etc/my.cnf?

-Steve

Jeff Harrington wrote:

> All,
>     I've been working on voicemail for a while, and haven't made much 
> progress.  In looking through the archives I've come up with a few 
> example configs.  My latest attempt gives me a number of errors.  I 
> was hoping some of the experts could help out with where I'm going 
> wrong.  I'm still in a test mode, so there are only 2 people 
> registering.  When I try to start ser, I get the below errors, and a 
> large number of Zombie processes:
>
> Sep 10 15:46:52 enforcer ser[30812]: connect_db(): Too many connections
> Sep 10 15:46:52 enforcer ser[30812]: db_init(): Error while trying to 
> connect da
> tabase
> Sep 10 15:46:52 enforcer ser[30812]: ERROR; vm_init_child: could not 
> init db mys
> ql://ser:heslo@localhost/ser
> Sep 10 15:46:52 enforcer ser[30812]: init_mod_child(): Error while 
> initializing
> module voicemail
> Sep 10 15:46:52 enforcer ser[30812]: init_children failed
>
> My config looks like this:
>
> #
> # $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 andrei Exp $
> #
> # simple quick-start config script
> #
>
> # ----------- global configuration parameters ------------------------
>
> #debug=3         # debug level (cmd line: -dddddddddd)
> #fork=yes
> #log_stderror=no        # (cmd line: -E)
>
> /* Uncomment these lines to enter debugging mode
> debug=7
> fork=no
> log_stderror=yes
> */
>
> check_via=no    # (cmd. line: -v)
> dns=no           # (cmd. line: -r)
> rev_dns=no      # (cmd. line: -R)
> #port=5060
> #children=4
> fifo="/tmp/ser_fifo"
> fifo_mode=0666
> alias="nysernet.org"
> alias="enforcer.nysernet.org"
>
> # ------------------ module loading ----------------------------------
>
> # Uncomment this if you want to use SQL database
> loadmodule "/usr/lib/ser/modules/mysql.so"
>
> loadmodule "/usr/lib/ser/modules/sl.so"
> loadmodule "/usr/lib/ser/modules/tm.so"
> loadmodule "/usr/lib/ser/modules/rr.so"
> loadmodule "/usr/lib/ser/modules/maxfwd.so"
> loadmodule "/usr/lib/ser/modules/usrloc.so"
> loadmodule "/usr/lib/ser/modules/registrar.so"
> loadmodule "/usr/lib/ser/modules/vm.so"
> loadmodule "/usr/lib/ser/modules/group.so"
>
> # Uncomment this if you want digest authentication
> # mysql.so must be loaded !
> loadmodule "/usr/lib/ser/modules/auth.so"
> loadmodule "/usr/lib/ser/modules/auth_db.so"
>
> # ----------------- setting module-specific parameters ---------------
>
> # -- usrloc params --
>
> #modparam("usrloc", "db_mode",   0)
>
> # Uncomment this if you want to use SQL database
> # for persistent storage and comment the previous line
> modparam("usrloc", "db_mode", 2)
>
> # -- auth params --
> # Uncomment if you are using auth module
> #
> modparam("auth_db", "calculate_ha1", yes)
> #
> # If you set "calculate_ha1" parameter to yes (which true in this 
> config),
> # uncomment also the following parameter)
> #
> modparam("auth_db", "password_column", "password")
>
> # -- rr params --
> # add value to ;lr param to make some broken UAs happy
> modparam("rr", "enable_full_lr", 1)
>
> # -- tm - fail on invite --
>
> modparam ("tm", "fr_inv_timer", 30)
>
>
> # -- voicemail params
> modparam ("voicemail","db_url","mysql://ser:heslo@localhost/ser")
>
> # -------------------------  request routing logic -------------------
>
> # main routing logic
>
> route{
>
>         # initial sanity checks -- messages with
>         # max_forwards==0, or excessively long requests
>         if (!mf_process_maxfwd_header("10")) {
>                 sl_send_reply("483","Too Many Hops");
>                 break;
>         };
>         if ( msg:len > max_len ) {
>                 sl_send_reply("513", "Message too big");
>                 break;
>         };
>
>         # we record-route all messages -- to make sure that
>         # subsequent messages will go through our proxy; that's
>         # particularly good if upstream and downstream entities
>         # use different transport protocol
>         record_route();
>         # loose-route processing
>         if (loose_route()) {
>                 t_relay();
>                 break;
>         };
>
>         # if the request is for other domain use UsrLoc
>         # (in case, it does not work, use the following command
>         # with proper names and addresses in it)
>         if (uri==myself) {
>
>                 if (method=="REGISTER") {
>
> # Uncomment this if you want to use digest authentication
>                 if (!www_authorize("enforcer.nysernet.org", 
> "subscriber")) {
>                         www_challenge("enforcer.nysernet.org", "0");
>                         break;
>                 };
>
>                         save("location");
>                         break;
>                 };
>        };
>
> # Is the user in the voicemail group?  If they are, store it in flag 
> 4, before
> #rewriting the flag with UsrLoc
> if (is_user_in ("Request-URI","voicemail")) {
>         setflag(4);
> };
>
>  #mark transaction for voicemail (routing block 2)
>         if (!lookup("location")){
>                 route(2);
>                 break;
>                 }
>
> # if user is on-line and is in voicemail group, enable redirection
> if (method == "INVITE" && isflagset(4)) {
>         t_on_failure("1");
> };
> t_relay();
> }
>
> #------------------Handling of unavailable user ---------------------
> route[2]{
> #non-voip -- just send not found
> if (!(method == "INVITE" || method == "ACK" || method == "CANCEL")){
>         sl_send_reply("404","Not Found");
>         break;
>         }
> #not voicemail subscriber
> if (!isflagset(4)){
>         sl_send_reply("404","Not Found and no voicemail available");
>         break;
> };
>
> #forward to voicemail now
> rewritehostport ("199.109.32.11:5090");
> t_relay_to_udp("199.109.32.11","5090");
> }
> #if forwarding downstream did not succeed, try voicemail running on 
> port 5090
> #
> failure_route[1] {
>         revert_uri();
>         rewritehostport ("199.109.32.11:5090");
>         append_branch();
>         t_relay_to_udp("199.109.32.11","5090");
> }
>
> Any advice as to what I can try would be appreciated.
>
> Thanks,
> Jeff
>
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers


-- 
  
ISC Network Engineering
The University of Pennsylvania
3401 Walnut Street, Suite 221A
Philadelphia, PA 19104  


voice: 215-573-8396 

       215-746-7903

fax: 215-898-9348    

sip:blairs at upenn.edu




More information about the sr-users mailing list