[asterisk-users] Spontaneous reboot due to MySQL lookups ?
Jonas Kellens
jonas.kellens at telenet.be
Thu Oct 4 10:10:01 CDT 2018
Hello
using Asterisk 1.8.32.
I notice that there is a spontaneous reboot of the Asterisk system from
time to time.
When I look in the logs (verbose file) I noticed that every time this
occurs it's at a moment that there is a MySQL action, be it a lookup or
an insert/update/delete.
I must say I do have some MySQL queries that occur in my dialplan when a
call comes in, to look up different actions to perform on this call.
An idea how to overcome this problem ? Seems a "performance" issue, no ?!
Is it better to have these MySQL queries to be done by an external
script (like a php script that I call with the System()-command or a
SHELL()-command) ?
Here are some examples from the verbose file.
[Aug 22 15:19:10] VERBOSE[2977] pbx.c: [Aug 22 15:19:10] --
Executing [s at sub-GetAlertInfo:3] MYSQL("SIP/SipAgenT01-0000317d",
"Connect connid localhost myuser mypwd myDB") in new stack
[Aug 22 15:19:10] VERBOSE[2977] pbx.c: [Aug 22 15:19:10] --
Executing [s at sub-GetAlertInfo:5] MYSQL("SIP/SipAgenT01-0000317d", "Query
resultid 1 SELECT uri, callinfo FROM distringtone WHERE onoff='1'") in
new stack
[Aug 22 15:19:18] VERBOSE[3306] config.c: [Aug 22 15:19:18] == Parsing
'/etc/asterisk/logger.conf': [Aug 22 15:19:18] VERBOSE[3306] config.c:
[Aug 22 15:19:18] == Found
[Aug 22 15:19:18] VERBOSE[3306] config.c: [Aug 22 15:19:18] == Parsing
'/etc/asterisk/asterisk.conf': [Aug 22 15:19:18] VERBOSE[3306] config.c:
[Aug 22 15:19:18] == Found
[Aug 22 15:19:18] VERBOSE[3306] manager.c: [Aug 22 15:19:18] == Manager
registered action DataGet
[Aug 22 15:19:18] VERBOSE[3306] config.c: [Aug 22 15:19:18] == Parsing
'/etc/asterisk/codecs.conf': [Aug 22 15:19:18] VERBOSE[3306] config.c:
[Aug 22 15:19:18] == Found
[Aug 22 15:19:18] VERBOSE[3306] loader.c: [Aug 22 15:19:18] Asterisk
Dynamic Loader Starting:
[Aug 22 15:19:18] VERBOSE[3306] config.c: [Aug 22 15:19:18] == Parsing
'/etc/asterisk/modules.conf': [Aug 22 15:19:18] VERBOSE[3306] config.c:
[Aug 22 15:19:18] == Found
[Aug 22 15:19:18] VERBOSE[3306] config.c: [Aug 22 15:19:18] == Parsing
'/etc/asterisk/res_config_mysql.conf': [Aug 22 15:19:18] VERBOSE[3306]
config.c: [Aug 22 15:19:18] == Found
[Aug 22 15:19:18] VERBOSE[3306] res_config_mysql.c: [Aug 22 15:19:18]
== MySQL RealTime driver loaded.
[Aug 22 15:19:18] VERBOSE[3306] loader.c: [Aug 22 15:19:18]
res_config_mysql.so => (MySQL RealTime Configuration Driver)
[Aug 22 16:23:25] VERBOSE[24283] pbx.c: [Aug 22 16:23:25] --
Executing [s at sub-GetSipAccountdetails:3]
MYSQL("SIP/SipAgenT01-00004184", "Connect connid localhost myuser mypwd
myDB") in new stack
[Aug 22 16:23:25] VERBOSE[24283] pbx.c: [Aug 22 16:23:25] --
Executing [s at sub-GetSipAccountdetails:4]
MYSQL("SIP/SipAgenT01-00004184", "Query resultid 1 SELECT SIPusername,
currstatus, available FROM tbl_SIP WHERE ID="800"") in new stack
[Aug 22 16:23:32] VERBOSE[24309] config.c: [Aug 22 16:23:32] == Parsing
'/etc/asterisk/logger.conf': [Aug 22 16:23:32] VERBOSE[24309] config.c:
[Aug 22 16:23:32] == Found
[Aug 22 16:23:32] VERBOSE[24309] config.c: [Aug 22 16:23:32] == Parsing
'/etc/asterisk/asterisk.conf': [Aug 22 16:23:32] VERBOSE[24309]
config.c: [Aug 22 16:23:32] == Found
[Aug 22 16:23:32] VERBOSE[24309] manager.c: [Aug 22 16:23:32] == Manager
registered action DataGet
[Aug 22 16:23:32] VERBOSE[24309] config.c: [Aug 22 16:23:32] == Parsing
'/etc/asterisk/codecs.conf': [Aug 22 16:23:32] VERBOSE[24309] config.c:
[Aug 22 16:23:32] == Found
[Aug 22 16:23:32] VERBOSE[24309] loader.c: [Aug 22 16:23:32] Asterisk
Dynamic Loader Starting:
[Aug 22 16:23:32] VERBOSE[24309] config.c: [Aug 22 16:23:32] == Parsing
'/etc/asterisk/modules.conf': [Aug 22 16:23:32] VERBOSE[24309] config.c:
[Aug 22 16:23:32] == Found
[Aug 22 16:23:32] VERBOSE[24309] config.c: [Aug 22 16:23:32] == Parsing
'/etc/asterisk/res_config_mysql.conf': [Aug 22 16:23:32] VERBOSE[24309]
config.c: [Aug 22 16:23:32] == Found
[Aug 22 16:23:32] VERBOSE[24309] res_config_mysql.c: [Aug 22 16:23:32]
== MySQL RealTime driver loaded.
[Aug 22 16:23:32] VERBOSE[24309] loader.c: [Aug 22 16:23:32]
res_config_mysql.so => (MySQL RealTime Configuration Driver)
[Oct 4 10:11:25] VERBOSE[4944] pbx.c: [Oct 4 10:11:25] --
Executing [s at sub-settings:16] MYSQL("SIP/SipAgenT01-000008cb", "Connect
connid localhost myuser mypwd myDB") in new stack
[Oct 4 10:11:25] VERBOSE[4944] pbx.c: [Oct 4 10:11:25] --
Executing [s at sub-settings:17] MYSQL("SIP/SipAgenT01-000008cb", "Query
resultid 1 SELECT blockID from DID where DID=987654321") in new stack
[Oct 4 10:11:29] VERBOSE[4961] config.c: [Oct 4 10:11:29] == Parsing
'/etc/asterisk/asterisk.conf': [Oct 4 10:11:29] VERBOSE[4961] config.c:
[Oct 4 10:11:29] == Found
[Oct 4 10:11:29] VERBOSE[4961] manager.c: [Oct 4 10:11:29] == Manager
registered action DataGet
[Oct 4 10:11:29] VERBOSE[4961] config.c: [Oct 4 10:11:29] == Parsing
'/etc/asterisk/codecs.conf': [Oct 4 10:11:29] VERBOSE[4961] config.c:
[Oct 4 10:11:29] == Found
[Oct 4 10:11:29] VERBOSE[4961] loader.c: [Oct 4 10:11:29] Asterisk
Dynamic Loader Starting:
[Oct 4 10:11:29] VERBOSE[4961] config.c: [Oct 4 10:11:29] == Parsing
'/etc/asterisk/modules.conf': [Oct 4 10:11:29] VERBOSE[4961] config.c:
[Oct 4 10:11:29] == Found
[Oct 4 10:11:29] VERBOSE[4961] config.c: [Oct 4 10:11:29] == Parsing
'/etc/asterisk/res_config_mysql.conf': [Oct 4 10:11:29] VERBOSE[4961]
config.c: [Oct 4 10:11:29] == Found
[Oct 4 10:11:29] VERBOSE[4961] res_config_mysql.c: [Oct 4 10:11:29]
== MySQL RealTime driver loaded.
[Oct 4 10:11:29] VERBOSE[4961] loader.c: [Oct 4 10:11:29]
res_config_mysql.so => (MySQL RealTime Configuration Driver)
Kind regards
Jonas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20181004/e150402e/attachment.html>
More information about the asterisk-users
mailing list