Hi, trying to run asterisk with realtime sip peers configuration via mysql and from time to time, after server restart asterisk can’t connect to mysql and just logging such messages:
[Mar 27 20:30:41] WARNING[1109]: res_config_mysql.c:1552 mysql_reconnect: MySQL RealTime: Insufficient memory to allocate MySQL resource.
[Mar 27 20:30:41] WARNING[1109]: res_config_mysql.c:1552 mysql_reconnect: MySQL RealTime: Insufficient memory to allocate MySQL resource.
[Mar 27 20:30:41] WARNING[1109]: res_config_mysql.c:1552 mysql_reconnect: MySQL RealTime: Insufficient memory to allocate MySQL resource.
[Mar 27 20:30:41] WARNING[1109]: res_config_mysql.c:1552 mysql_reconnect: MySQL RealTime: Insufficient memory to allocate MySQL resource.
[Mar 27 20:30:41] WARNING[1109]: res_config_mysql.c:1552 mysql_reconnect: MySQL RealTime: Insufficient memory to allocate MySQL resource.
[Mar 27 20:30:41] WARNING[1109]: res_config_mysql.c:1552 mysql_reconnect: MySQL RealTime: Insufficient memory to allocate MySQL resource.
[Mar 27 20:30:41] NOTICE[1109]: chan_sip.c:28003 handle_request_register: Registration from '202 <sip:202@10.76.0.221:5060>' failed for '192.168.6.21:5060' - Wrong password
Restarting asterisk daemon solve the problem, but do not always have such an opportunity: to connect and restart the service.
I have several servers with such problem(about five or six), running ubuntu 12.04/14.04 and latest certified asterisk 11.
Maybe somebody faced with similar problem and knows how to resolve it.
Unfortunately I did not find any answers on this issue in internet and documentation.
One difference I notice between yours and an old 1.4 installation I have is I’m using the socket. It’s faster if your asterisk and mysql are on the same server and you don’t have the tcp overhead.
dbsock = /tmp/mysql.sock
;dbcharset = latin1
I can also give you a config for res_odbc option if you would like to try it.
Thank’s, sure i like to try, may be via odbc it can work without that problem.
Think problem can be in ubuntu startup system, or mysql start up scripts in ubuntu packages.
I have several servers so and never had this problem, see my configuration files.
res_config_mysql.conf
[pbxip]
dbhost = 127.0.0.1
dbname = db name
dbuser = db user
dbpass = db password
dbport = 3306
dbsock = /var/run/mysqld/mysqld.sock
dbcharset = latin1
requirements=warn ; or createclose or create char
Thanks for replying.
Could you tell me what all conf files you changed in order to do that?
Did you still end up using res_config_mysql.conf and res_mysql.conf ?
I have a issue with res_config.conf i.m db host name user name a to z perfectly but when create a user in database server and in asterisk CLi show endpoint its never show user id which create in database
just a note, in general res_odbc.so connecting to mySQL has better support than res_mysql.so
reason is that res_odbc.so have many more users to find bugs and many more that matain it = way less bugs
so I would strongly recoment that you switch to res_odbc.so