[asterisk-users] MySQL Connect problem...

Geraint Lee geraint at gmail.com
Tue Aug 17 06:59:44 CDT 2010


Right, I'm baffled.

I have:
exten => s,1,MYSQL(Connect DB1 127.0.0.1 geraint xxx amis2)
exten => s,n,MYSQL(Query NORESULT ${DB1} INSERT\ INTO\ recordings\
(caller_number\,called_number\,date_created\,date_started\,in_use\,server_id)\
VALUES\ (\'${CALLERID(number)}\'\,\'${ARG1}\'\,NOW()\,NOW()\,\'Yes\'\,12))
exten => s,n,MYSQL(Query RESULT1 ${DB1} SELECT\ LAST_INSERT_ID())
exten => s,n,MYSQL(Fetch FOUND1 ${RESULT1} VALUE1)
exten => s,n,MYSQL(Clear ${RESULT1})
exten => s,n,MYSQL(Disconnect ${DB1})
exten => s,n,MixMonitor(${VALUE1}.wav)
exten => s,n,Set(CALLERID(all)=xxx)
exten => s,n,Dial(SIP/prov1/${ARG1})

in a macro to dial numbers...

Every few hours or so every call hangs on the s,1 MYSQL(Connect) and won't
work until i restart asterisk.

The mysql server has a maximum connections of 2048 (of which around 90 are
in use) so it's not a mysql connection limit problem from what i can tell
since while asterisk is "stuck" i can still log in to mysql just fine, as
can the web server.

Does anyone have any suggestions what could be causing asterisk to get stuck
here? i don't see anything in cli and core show channels just shows everyone
stuck in state ring on the connect string with no errors.

Cheers

Geraint
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100817/02028199/attachment.htm 


More information about the asterisk-users mailing list