[sr-dev] mysql_ping in db_mysql_submit_query

Juha Heinanen jh at tutpro.com
Thu Sep 12 10:53:06 CEST 2019


Daniel-Constantin Mierla writes:

> Are the two connections going to the same mysql server? Or different ones?

Different ones.

> Are you able to see from the logs if writing to the first connection
> failed and it tried to the second one?

No, everything seems normal.  Here is the last working acc insert before the freeze:

Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: acc [acc_logic.c:446]: should_acc_reply(): acc is on
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: db_cluster [dbcl_api.c:482]: db_cluster_use_table(): use table (accounting) - cluster [sip_proxy_usage_cluster]
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: db_cluster [dbcl_api.c:491]: db_cluster_use_table(): set read table (accounting) - cluster [sip_proxy_usage_cluster] (5/0)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: db_cluster [dbcl_api.c:501]: db_cluster_use_table(): set write table (accounting) - cluster [sip_proxy_usage_cluster] (5/0)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: db_cluster [dbcl_api.c:491]: db_cluster_use_table(): set read table (accounting) - cluster [sip_proxy_usage_cluster] (4/0)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: db_cluster [dbcl_api.c:501]: db_cluster_use_table(): set write table (accounting) - cluster [sip_proxy_usage_cluster] (4/0)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: db_cluster [dbcl_api.c:378]: db_cluster_insert(): executing db cluster insert command
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: db_cluster [dbcl_api.c:379]: db_cluster_insert(): serial operation - cluster [sip_proxy_usage_cluster] (5/0)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: acc [acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2, message_index 7, index i 0
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: tm [t_reply.c:1667]: cleanup_uac_timers(): RETR/FR timers reset
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: <core> [core/receive.c:442]: receive_msg(): reply-route executed in: 1395 usec
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: <core> [core/xavp.c:495]: xavp_destroy_list(): destroying xavp list (nil)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: <core> [core/receive.c:458]: receive_msg(): cleaning up
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: <core> [core/udp_server.c:491]: udp_rcv_loop(): received on udp socket: (112/100/1063) [[INVITE ...]]

After that there is a couple of these:

Sep  2 12:00:21 rox2 /usr/bin/sip-proxy[341]: DEBUG: acc [acc_logic.c:413]: should_acc_reply(): probing acc state - code: 183 flags: 0x200209c0
Sep  2 12:00:21 rox2 /usr/bin/sip-proxy[341]: DEBUG: acc [acc_logic.c:442]: should_acc_reply(): early media acc is off

And finally the last should_acc_reply() before the freeze that does not
result to any kind db_cluster entry in syslog:

Sep  2 12:00:21 rox2 /usr/bin/sip-proxy[341]: DEBUG: acc [acc_logic.c:413]: should_acc_reply(): probing acc state - code: 480 flags: 0x240005c4
Sep  2 12:00:21 rox2 /usr/bin/sip-proxy[341]: DEBUG: acc [acc_logic.c:430]: should_acc_reply(): failed acc is on
Sep  2 12:00:21 rox2 /usr/bin/sip-proxy[341]: DEBUG: tm [t_lookup.c:1111]: t_check_msg(): msg (0x7f2383bea9e0) id=12872/341 global id=12872/341 T end=0x7f236b1cc3f0
Sep  2 12:00:21 rox2 /usr/bin/sip-proxy[341]: DEBUG: tm [t_reply.c:2243]: reply_received(): transaction found - T:0x7f236b1cc3f0 branch:0

Next process 341 entry in syslog is 13+ minutes later after the freeze:

Sep  2 12:13:55 rox2 /usr/bin/sip-proxy[341]: DEBUG: tm [t_reply.c:2256]: reply_received(): org. status uas=408, uac[0]=408 local=0 is_invite=1)

-- Juha



More information about the sr-dev mailing list