Re: running out of mysql-connections




"ojorus" <ojorus@xxxxxxxxxxx> wrote in message
news:4680c495$1@xxxxxxxxxxxxxxxxxxxx
I'm having a flash-file (swf) which is requesting info from a PHP-file
every
ten seconds. The PHP-file connects to a mysql-database, make a short
query,
and then close the connection, before it returns the info to the swf.

Like this:
$mysqli = mysqli_connect($dbhost, $dbusername, $dbuserpassword,
$default_dbname, $port); //open connection
$number = getNumber(); //the function makes a query, and return a number
mysqli_close($mysqli); // closing connection
echo "&number=$number"; // returns the number to yhe swf

The problem is that it seems like the mysqli-connection will not close
from
time to time. I have a limitation of 1000 connections, which should be
enough really. But if I run the flash-file for hours (say 8 hours), the
limitation of 1000 OPEN connection is reached, even if I was hoping there
should only be ONE open connection at a time.

Any suggestions why this problem appear?

// ojorus



The wait timeout for mysql is 3600 seconds by default. Decrease it if you
can.


.



Relevant Pages

  • Re: Do I have to close an odc in a macro?
    ... Open connection, Issue query, Close connection. ... summary sheet. ...
    (microsoft.public.excel.programming)
  • Re: Best connection management
    ... I know that open connection is an expensive operation, so If I need to open and close for every query I have to do can I produce a performance problem? ... connection instance in a multithreaded app. ... if I have in my "dbManager" class a single SqlConnection instance to open and close for every operation could be a good solution? ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Visual Query Builder
    ... %Connection String ... invoke(cn,'Open', cnstr); ... %open recordset and run query invoke; ...
    (comp.soft-sys.matlab)
  • Best way for implementing mutliple select statements
    ... What's the most efficient method for using multiple select statements from ... Open db connection once or open connection for each query? ...
    (microsoft.public.inetserver.asp.db)