<div dir="ltr"><div><div><div><div><div><div><div>I am calling a lua script from dialplan which does following steps ...<br><br></div>1- Gets freeswitch dbh handle (odbc mysql)<br></div>2- Runs a mysql stored procedure which returns balance remaining amount for the subscriber who made call.<br></div>3- Save the amount in session variable and released dbh handle<br></div>4- Play sound files as per output received and saved in step 3<br><br></div>Now upto 200 calls and first 2-3 hours of start all work fine. I can see in Database that script uses 32 connections approx at a given time (I think connection pooling works) but suddenly connections start increasing and go upto 300+ and because of that database stops responding and i have to kill freeswitch to make production DB responsive again.<br><br></div>I am not sure where and what I should check. Can someone give me pointers on what I can check?..Or I am doing something fundamentally wrong.<br><br></div>Can there be such a case where lua scripts hang and never release connection?<br><div><div><div><br><br><br><br><br></div></div></div></div>