I just started using mysqli on my development server with PHP 5.1.6 and MySQL 5.0.27. We need mysqli to take advantage of some stored procedures that we've created.
However, the problem is we get this error ever once in a while:
Warning: mysqli::mysqli() [function.mysqli-mysqli]: (00000/1040): Too many connections in init.php on line 38
It's especially annoying because once this error occurs, the MySQL server won't come back up. I have no idea how we're building up so many connections. We do call $mysqli->close() at the end of the scripts. We don't have any extremely intensive queries that get called a lot.
It's a development server and it's not heavily trafficked. We have a whole box and probably only two or three people on it at a time. In php.ini I have mysqli.max_links = -1.
I saw a really old thread dealing with this [link], but does anybody have any more recent experience with this?