|
#26
|
|||
|
|||
|
Quote:
Or for every Cpanel? Or is there a hard limit for the MySQL server of "max_connections: 100", and each Cpanel account that uses it can have 25 of them? I reasonably clear on the concept of shared hosting, having multiple domains on one server, etc. What I know nothing about is how many MySQL servers are on each server (hardware). I just re-ran the previously mentioned command through PuTTy, I'm getting the same stats for both databases: Max_used_connections = 40, and it appears that "Connections" are the total number of connections ever made since the MySQL server was started. 2 days ago it was about 1.8 million, now it is 4.3 million. |
|
#27
|
||||
|
||||
|
The limit is 25 per SQL user.. you could technically have multiple SQL users.. each user you create in cPanel in the MySQL area is a new user.
The max connections of 100 is for the entire SQL server for everyone. 100 is more then enough, since SQL connections should last a split second for the most part. If your queries run more then a second or two, you might want to look into Indexing your tables, and or changing your queries around. One good tip is, instead of doing multiple joins to get data, maybe try derived tables, but indexing is usually a good place to start. |
|
#28
|
|||
|
|||
|
I know this is a really really dumb question, but how many MySQL severs on a shared server? One for all accounts on that shared server?
Quote:
Is there a link to where all this explained in simple terms? I appreciate the suggestions for improving performance, but I'm just trying to understand the very basics at this time. |
|
#29
|
||||
|
||||
|
Quote:
As GatorDaveC said "you could technically have multiple SQL users", but you would need to modify your application to use more than one user.
__________________
quietFinn - netFinn Finland "Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss |
|
#30
|
|||
|
|||
|
Quote:
It appears that the MySQL server is making about a million connections a day for the entire shared server. And that the max connections ever made is 40 on the whole server. If that is the case then 25 connections should be plenty unless something is terribly wrong. Thanks again. |
|
#31
|
|||
|
|||
|
Couple of questions.
It appears some search bots caused the excess number of connections on my forum (best guess) about 2 weeks ago (shared hosting). If that happens again with more frequency, will it simply send progressively more errors, or could my account be suspended for hours/days? |
|
#32
|
|||
|
|||
|
Quote:
Make sure that persistent connections are disabled in the forum config. Persistent connections remain open once the script has stopped running in order to save a fraction of a second reconnecting during the next request but that's not exactly shared hosting friendly. It will almost certainly screw your process/connection limit if you've got 40 active users at the same time. I really don't understand how you can be breaching 25 processes otherwise, especially with only 40 active users at once. The likelihood of 25 of 40 users hitting the server at exactly the same moment is virtually nil. |
|
#33
|
|||
|
|||
|
Quote:
It appears after further research that there was a huge number of people opening up one specific thread when the connections were exceeded. That was an extremely important thread to many people and everyone wanted to open it up all at once. I'm still unclear on a few details regarding how all this works. For example there were comments on this forum regarding 1 thread = 1 connection but I really don't think once the information gets to the end user the connection would be held open. Also I'm not clear what happens when searches are made or any other information is being asked for when there are anomalies in the database that could cause delays, the connections are probably held open during that time, so a 'bad' table in the database may appear to cause too many connections as well. I am cautiously optimistic that HG will not simply shut down the server for long periods of time because of a glitch such as this unless there is a huge issue, but it would be great if someone from HG could comment about that. |
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 25 process limit on shared servers | kbs | Suggestions | 6 | 05-05-2008 01:38 PM |