Every now and then I get an email from a customer that says they're getting a mysql_error() message "too many connections".
I'm on a shared server at HostGator (one of their reseller packages) and recently found out that they only allow 25 mysql connections per cpanel user which seems really low to me.
I don't have enough permissions to change this setting and their support guys say they're not allowed to change it. They certainly don't advertise this fact when you sign up, but are otherwise a reasonably good host, I think.
Short of upgrading to a virtual private server (double the price) is there another way this can be addressed?
Does each query count as a "connection"? With the low number of users (about 30-50 a day) I don't really see why this is an issue because they aren't all on at the exact same time. If each query counts as a "connection" it would make more sense because there are some scripts that make 5 or 10 queries on a page.
I have not been using mysql_close() because I read in the PHP manual that all connections are closed at the end of the script anyway. Is this correct?