Adam Posted March 2, 2011 Report Share Posted March 2, 2011 First of all, is it 50 concurrent connections for shared hosting as well as semi-dedicated? Well, I run a wordpress site with caching. If someone loads a cached page, does it connect to MySql and count as a connection? Quote Link to comment Share on other sites More sharing options...
Michael D. Posted March 2, 2011 Report Share Posted March 2, 2011 First of all, is it 50 concurrent connections for shared hosting as well as semi-dedicated? Well, I run a wordpress site with caching. If someone loads a cached page, does it connect to MySql and count as a connection?Any time you connect to MySQL it uses a connection. Depending on how long the query/ies are is it can be from a split second to several seconds. A connection limit of 50 does not mean you are limited to 50 users and a vast majority of providers offer between 10 and 15 connections with some exceptions as high as 25. 50 is actually exceptionally high for any sort of shared environment and yes, the limit is the same on shared and semi-dedicated. If you're crossing 50 concurrent connections one of two things is going on:You're way out of the bounds of a regular shared or semi-dedicated account.You have some really poor queries or you're running a LOT of queries per page load. Quote Link to comment Share on other sites More sharing options...
Adam Posted March 3, 2011 Author Report Share Posted March 3, 2011 Any time you connect to MySQL it uses a connection. Depending on how long the query/ies are is it can be from a split second to several seconds. A connection limit of 50 does not mean you are limited to 50 users and a vast majority of providers offer between 10 and 15 connections with some exceptions as high as 25. 50 is actually exceptionally high for any sort of shared environment and yes, the limit is the same on shared and semi-dedicated. If you're crossing 50 concurrent connections one of two things is going on:You're way out of the bounds of a regular shared or semi-dedicated account.You have some really poor queries or you're running a LOT of queries per page load. If my pages are cached, do they open a connection to MySql? Quote Link to comment Share on other sites More sharing options...
Michael D. Posted March 3, 2011 Report Share Posted March 3, 2011 If my pages are cached, do they open a connection to MySql?It really depends on how much of the page is being cached (i.e. is it just the main portion and the widgets are still loading dynamically). Generally caching is an attempt to avoid doing the same queries repeatedly. For example - if nothing has changed on your site and two people visit the page 10 minutes apart - why would you need to run the same exact query twice when you can run it once and serve the static copy to the second visitor? Quote Link to comment Share on other sites More sharing options...
Adam Posted March 3, 2011 Author Report Share Posted March 3, 2011 It really depends on how much of the page is being cached (i.e. is it just the main portion and the widgets are still loading dynamically). Generally caching is an attempt to avoid doing the same queries repeatedly. For example - if nothing has changed on your site and two people visit the page 10 minutes apart - why would you need to run the same exact query twice when you can run it once and serve the static copy to the second visitor? Is there a way I can check all these stats and figure out how many queries per page load, how many cached queries, etc.? Quote Link to comment Share on other sites More sharing options...
Michael D. Posted March 3, 2011 Report Share Posted March 3, 2011 Is there a way I can check all these stats and figure out how many queries per page load, how many cached queries, etc.?There are some plugins that do this depending on what script you're running - I don't know of any off the top of your head. There are no tools from the hosting side of things that would do it. I mean, you could run mytop via SSH to see your queries in realtime but you would have no way of seeing which particular URL caused it, whether it you or a visitor, etc. You would want to seek out the support department or forums for whatever script you're wanting to see these metrics as surely you're not the first person to want to see this information assuming it's not a one-off custom application. Quote Link to comment Share on other sites More sharing options...
Adam Posted March 3, 2011 Author Report Share Posted March 3, 2011 Of to the WordPress forums... I'll be back with a resolution and I will post it so I could make this thread useful to someone. Quote Link to comment Share on other sites More sharing options...
Michael D. Posted March 3, 2011 Report Share Posted March 3, 2011 Of to the WordPress forums... I'll be back with a resolution and I will post it so I could make this thread useful to someone.Ok Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.