Go Back   HostGator Peer Support Forums > Public Forums > Suggestions

Notices

Reply
 
Thread Tools
  #26  
Old 09-17-2009, 04:11 PM
Abomination Abomination is offline
Hatchling Croc
 
Join Date: Sep 2008
Posts: 40
Default Re: Please increase process limit

Quote:
Originally Posted by quietFinn View Post
Yes, the Max_used_connections variable is for the whole mySQL server.
So is the limit 25 connections per MySQL server?

Quote:
Originally Posted by striddy View Post
Every cpanel account, not every domain.
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.
Reply With Quote
  #27  
Old 09-17-2009, 05:25 PM
GatorDaveC's Avatar
GatorDaveC GatorDaveC is offline
HostGator Staff
 
Join Date: Mar 2006
Location: Ontario, Canada
Posts: 2,147,483,721
Default Re: Please increase process limit

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.
Reply With Quote
  #28  
Old 09-17-2009, 05:42 PM
Abomination Abomination is offline
Hatchling Croc
 
Join Date: Sep 2008
Posts: 40
Default Re: Please increase process limit

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:
Originally Posted by GatorDaveC View Post
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.
This is slightly confusing. I've got 1 user affiliated with my databases (me). Are you saying if I created another user and assigned them to the same databases I get 50 connections? Somehow I don't think that is the case, and even if it were, and others were using the same MySQL server would not be happy about doing that if there is a max limit of 100.

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.
Reply With Quote
  #29  
Old 09-17-2009, 05:47 PM
quietFinn's Avatar
quietFinn quietFinn is offline
Emperor Croc
 
Join Date: Feb 2005
Posts: 2,765
Default Re: Please increase process limit

Quote:
Originally Posted by Abomination View Post
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?
One for all accounts on that shared server.


Quote:
Originally Posted by Abomination View Post
Are you saying if I created another user and assigned them to the same databases I get 50 connections?
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
Reply With Quote
  #30  
Old 09-17-2009, 08:00 PM
Abomination Abomination is offline
Hatchling Croc
 
Join Date: Sep 2008
Posts: 40
Default Re: Please increase process limit

Quote:
Originally Posted by quietFinn View Post
One for all accounts on that shared server.



As GatorDaveC said "you could technically have multiple SQL users", but you would need to modify your application to use more than one user.
You have a way of wording things so I can understand them, thank you for your help.

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.
Reply With Quote
  #31  
Old 09-17-2009, 09:00 PM
Abomination Abomination is offline
Hatchling Croc
 
Join Date: Sep 2008
Posts: 40
Default Re: Please increase process limit

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?
Reply With Quote
  #32  
Old 09-18-2009, 12:15 AM
jreece jreece is offline
Hatchling Croc
 
Join Date: Dec 2008
Posts: 9
Default Re: Please increase process limit

Quote:
Originally Posted by Abomination View Post
I'm using stock vB and am running out of connections with 40 people online, I know they click a lot of buttons, but still.
vBulletin? I could be way off here but doesn't vBulletin have an option to use persistent database connections?

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.
Reply With Quote
  #33  
Old 09-18-2009, 12:06 PM
Abomination Abomination is offline
Hatchling Croc
 
Join Date: Sep 2008
Posts: 40
Default Re: Please increase process limit

Quote:
Originally Posted by jreece View Post
vBulletin? I could be way off here but doesn't vBulletin have an option to use persistent database connections?

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.
You are correct, it is possible to have persistent connections with vBulletin but those are disabled in the config file. I just got off the phone with tech support and although there are about 30 people online when we talked on the phone there were few connections at that time (0 or 1) while I was busily clicking on my forum.

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.
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
25 process limit on shared servers kbs Suggestions 6 05-05-2008 01:38 PM

All times are GMT -6. The time now is 10:45 AM.

 
Forum SEO by Zoints