[asterisk-users] Re: mySQL and to many connections with SQL statement UPDATE

Thomas Winter thowinter at googlemail.com
Mon Dec 25 01:41:42 MST 2006


Am Sunday 24 December 2006 16:53 schrieb JR Richardson:
> > If Iam doing UPDATE SQL statements I got an overload for connection.
> > am doing everytime an Disconnect ${connid}) but this is ignored.
> >
> > any idea?
>
> You must clear the resut ID and also issue a disconnect to the
> connection ID, see priority 4 and 5.

> Or a simpler method is to setup realtime access to the database and
> use the realtime cmd, this will control the mysql access and you won't
> have to worry about the connections.
>
> http://www.voip-info.org/wiki/view/Asterisk+cmd+RealTime

Iam using lots of SELECT statements and do not have problems.

The problem occurs if using the SQL statement UPDATE.

I tried with and without MYSQL(Clear ${resultid}.) If using I got an working 
that there is nothing to clear. Usage seemed to be onyl for SELECT 
statements.

MYSQL(Disconnect ${connid}) is obviously not working.

The connection is not closed and mySQL is running shortly out of avaiable 
connections.

WARNING[12189] app_addon_sql_mysql.c: aMYSQL_query: mysql_store_result() 
failed on query UPDATE .......;

best regards
Thomas







More information about the asterisk-users mailing list