Quote:
Originally Posted by CaptainCrunch
As an addon I went back to my hosting service after they recommended increasing maxconnections and they said they won't do this.
They added this on to their email
t is not possible to increase the max_connect variable in my.cnf. , it appears like at that time you have exceeded the limit and so received the error message. To overcome by exceeding the maximum concurrent connections, please close all open connections in your script when there is no scope for fetching data from database.
Is there a way to do this and what script would I be doing this in?
Thanks
|
This would be something deep inside the phpBB software and wouldn't be something that you could easily change, and wouldn't want to since the phpBB software itself does what they're saying to do anyway. Sounds like they have little to no experience with forum software.
Since it is using mysqli it actually keeps the connections open on purpose so it doesn't have to close and reopen them, but at some point more than 10 connections are needed and it's trying to get the 11th and gets the error.
Why it needs the 11th is the question here. If it's because the forum is just getting too busy for such a low limit, then there's not much you can do. There is a way you could try and get around the limit, but that might rise the ire of your host (I'll mention that at the end).
There's lots of other possible reasons it needs the 11th. It could be that the entire machine is overworked and the database is taking too long to respond to queries, so requests get backed up waiting for the database. It could be that someone has decided to attack the forum and that is tying up database connections. Plus a bunch of others. One would have to debug the issue (requires good experience in such things, more on the sysadmin level though) to determine what it was to know what to try.
You can try doing a check and repair on the mysql forum tables, if there's something wrong there it might be causing the database to respond slowly.
You could ask them if they can set the max-persistent variable, that might help in that at least it might not give an error and will either just wait for a connection or at least give a forum busy type message.
http://www.php.net/manual/en/mysqli....max-persistent
Did you create the mysql username and password for the forum? Reason I ask is because if you did, there is a way to maybe get around the limit but they probably wouldn't like it too much. If you created the ID and password, you can create another ID with the same password and the same access to the forum database, and then in the config you can make it so it'll choose randomly to use one or the other. If the connections are limited based on user ID then that'll double your available connections.
https://www.phpbb.com/community/view...f=46&t=2102502
But still sounds like you'd be better off moving to either a host that understands forums better and wants to support them, or a hosted solution that worries about all the details for you.
EDIT: Or if you have someone that knows Linux and sysadmin type stuff, you could setup a VPS and then you'd have full control over the system.