XF 2.2 More than 30 MySQL connections open at the same time

AnjaV

Member
My host says That i did not close the MySQL connections properly while I'm not even aware that I seem to have more that 30 MySQL open connections at the same time. But when I do I see messages like in the attachments of another member. On a computer as well, on Mac, on iPad, with all kind of browsers, it just happen. While opening the website, switching pages, opening a photo, sending comments, it just happens. Refreshing the page will help. One time or maybe five times.
It's very frustrating.

My host recommended I should transfer from shared hosting to VPS which I can not afford.

Who is familiar with there database and server errors and who has the solution?
 

Attachments

  • 27F7D802-F09D-4557-B5D1-BFD28AE1039A_1_102_o.jpeg
    27F7D802-F09D-4557-B5D1-BFD28AE1039A_1_102_o.jpeg
    62.6 KB · Views: 24
  • 93F99E8F-E8C2-47EA-931D-469E5C864456_1_102_o.jpeg
    93F99E8F-E8C2-47EA-931D-469E5C864456_1_102_o.jpeg
    58.4 KB · Views: 24
  • 153A1940-331C-4B15-A876-1B68546486D4_1_102_o.jpeg
    153A1940-331C-4B15-A876-1B68546486D4_1_102_o.jpeg
    17.9 KB · Views: 22
  • D8DD5ED3-BFF4-48AB-B478-5873A1B4A6E1_1_102_o.jpeg
    D8DD5ED3-BFF4-48AB-B478-5873A1B4A6E1_1_102_o.jpeg
    54.6 KB · Views: 24

AnjaV

Member
Hmm, are you sure? T
That's what they told me.
Ik moet je helaas teleurstellen dat dit config bestand niet aangepast kan worden op een shared hosting, dit bestand is namelijk van actief op server niveau en beïnvloed dus alle klanten op het platform.

Voor het aanpassen van de redis configuratie is dat wel weer mogelijk bij een VPS of Dedicated server, omdat je hier een volledig eigen hosting omgeving hebt.
Je hebt dan hierin dus meer vrijheid als het op zulke kwesties aankomt.
 

PaulaG

Member
My shared hosting provider places a limit on the number of simultaneous connections per DB user. When the Forum got busy we would start seeing these errors. And as with your hosting service, they told me we would have to move to a dedicated server which we could not afford.

I modified the PHP code that sets up the MySQL connection for each user session when a user logs in. I created 10 DB User accounts in MySQL, replaced the single MySQL connection User/Password variables with a list of 10, and then the modified the PHP to randomly pick one of the 10 MySQL users when the Xenforo user session starts up. In a case like yours where you are limited to 30 simultaneous connections per MySQL, this modification effectively gives you a new limit of 300.

We’ve been running for a couple of years now on a shared server with no problems.
 

Mr. Jinx

Well-known member
That's what they told me.
Nah, you asked the wrong question or they didn't understand your question.
You cannot change the Redis config, but that is no problem. You can change the XF config (located in /src/config.php).
In there, you specify the Redis server, which you can find in your controlpanel.
 

MattW

Well-known member
Does Matt have any servers based in USA?
Or Europe / Amsterdam? (y)
USA / Canada and London

I have a lot of customers from here, and can provide examples if people are interested.

 

Rhody

Well-known member
I'll keep that in mind. Very intrigued to be able to use the paid Enhanced Search feature of XF. This isn't an option on my current Litespeed based shared server w/cpanel.
 
Top