Please anyone explain this mysql concurrent connections. My host is providing only 10 concurrent connections. Is that enough?.
Does that mean only 10 users can access the website at the same time?
Please anyone explain this mysql concurrent connections. My host is providing only 10 concurrent
Share
This isn’t a well-defined measure of what 10 concurrent users means. Consider the following hypothetical blog I have:
I go to example.com/blog and it loads in 100 ms. I then read this page for 3 minutes. In the course of three minutes, the page I loaded spent 100ms loading, where < 100ms was actually used connecting to a database.
That means at the exact same time I was loading the page, 9 other people could have been also loading a page. The page has been open for 3 more minutes, however, and no concurrent connections were exhausted and hundreds of other people could have loaded the page, concurrent connections unrelated to me ‘accessing the website’.
So the important take-away is at any given precise moment will you ever have more than 10 people accessing it? Assuming you find even the most elementary ways to reduce the page load times of your code-behind (the php, not external assets being loaded), you’ll be easy able to handle hundreds of people an hour without once running into a “Too many connections” error, which would be the signal of an actual issue.
On the other hand–and again depending on your content–if you think you have enough users (or enough db connections) to by-chance have > 10 users all trying to do something within the exact same ~100-200ms of time window, that persists on attempted refreshes–then you’d have to request the host up that limit or move elsewhere. On that note, many hosts and the web servers behind it can help log these issues or bring them to your attention. Until then, there’s a good chance 10 concurrent users is sufficient for even medium sized websites.