<div>Hi,</div>
<div> </div>
<div>I am investigating an issue with voicemail and realtime.</div>
<div> </div>
<div>What we are seeing is the following:</div>
<div>1. Caller calls in and goes to an IVR</div>
<div>2. Presses 101 to go to voicemail</div>
<div>3. app_voicemail start and tries to connect to the database trhough res_config_mysql. However, it takes too long to be able to connect (~15 minutes)</div>
<div>It seems like it first attemots to connect to the database on 16:25:03 and manage to connect at 16:40:24.</div>
<div> </div>
<div>[Mar 26 16:25:03] VERBOSE[19786] logger.c: -- AGI Script agi://127.0.0.1/enswitch?stype=external completed, returning 0<br>[Mar 26 16:25:03] DEBUG[19786] pbx.c: Launching 'Answer'<br>[Mar 26 16:25:03] VERBOSE[19786] logger.c: -- Executing [101@enswitch-mailbox:1] Answer("SIP/5060-ac017e30", "") in new stack<br>
[Mar 26 16:25:03] DEBUG[19786] pbx.c: Expression result is '0'<br>[Mar 26 16:25:03] DEBUG[19786] pbx.c: Launching 'GotoIf'<br>[Mar 26 16:25:03] VERBOSE[19786] logger.c: -- Executing [101@enswitch-mailbox:2] GotoIf("SIP/5060-ac017e30", "0?5") in new stack<br>
[Mar 26 16:25:03] DEBUG[19786] pbx.c: Not taking any branch<br>[Mar 26 16:25:03] DEBUG[19786] pbx.c: Launching 'VoiceMail'<br>[Mar 26 16:25:03] VERBOSE[19786] logger.c: -- Executing [101@enswitch-mailbox:3] VoiceMail("SIP/5060-ac017e30", "<a href="mailto:101@708%7Cus">101@708|us</a>") in new stack<br>
[Mar 26 16:25:03] DEBUG[19786] app_voicemail.c: Before find_user<br>[Mar 26 16:25:03] DEBUG[19786] app_voicemail.c: In find_user_realtime for mailbox 101 context 708<br></div>
<div> </div>
<div>[Mar 26 16:40:24] VERBOSE[14269] logger.c: Really destroying SIP dialog <a href="mailto:'1004787600@127.0.0.1'">'1004787600@127.0.0.1'</a> Method: OPTIONS<br>[Mar 26 16:40:28] ERROR[19786] res_config_mysql.c: MySQL RealTime: Ping failed (2006). Trying an explicit reconnect.<br>
[Mar 26 16:40:28] DEBUG[19786] res_config_mysql.c: MySQL RealTime: Server Error (2006): MySQL server has gone away<br>[Mar 26 16:40:28] DEBUG[19786] res_config_mysql.c: MySQL RealTime: Successfully connected to database.<br>
[Mar 26 16:40:28] DEBUG[19786] res_config_mysql.c: MySQL RealTime: Retrieve SQL: SELECT * FROM mailboxes WHERE mailbox = '101' AND context = '708'<br></div>
<div>The database and the connection seems to be ok. It is only this query that's taking long.</div>
<div> </div>
<div>We are experiencing this on Asterisk 1.4.17 and 1.4.18 but difficult to reproduce.</div>
<div> </div>
<div>Anybody have any idea what might be the cause and how to procceed and figure out what's wrong?</div>
<div> </div>
<div>Thanks in advance.</div>
<div> </div>
<div>R</div>