You are here: Re: running out of mysql-connections « PHP Programming Language « IT news, forums, messages
Re: running out of mysql-connections

Posted by pritaeas on 06/26/07 08:43

"ojorus" <ojorus@hotmail.com> wrote in message
news:4680c495$1@news.broadpark.no...
> 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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация