webmasterbeta
New Member
My current shared host has a limit of 25 simultaneous mySQL connections. My site is using way more than 25 mySQL connections at a time (it's getting busy), so it gives users 500 Internal Server Errors constantly. I had a few questions:
1. Do mosts hosts put a cap on shared servers?
2. Is 25 standard?
3. If I moved to a dedicated server, what kind of limits can I expect in terms of max simultaneous mySQL connections?
Thanks!
BenMost hosts do place limitations on max number of SQL connections, max CPU % usage, and so on. On a dedicated server you can choose how many simultaneous connections you want, and are only limited by your hardware specifications.On a basic dedicated server, how many connections could I expect to handle? Say, a single 2.0ghz cpu, and 1gb of ram.Also, is there anyway that I can monitor my average connections myself on a shared cPanel server?On a server pointed by you a max connection of 100 should work fine.Are you using any connection pooling?100 may not enough if the customer is running bad open sourced software. There's a certain shopping cart out there that makes multiple queries with just one function...so when the search spiders come (not even actual visitors) BLAM and you got your 100.
But 25 is the standard. If they need more they should upgrade to a VPS.1. We have found this to be true as well however there are some hosts that do not limit them.
2. I am not sure but there is a number set by most hosts. Going back to point #1.
3. Depends on the OS. MySQL does not place a limit on the connections between versions but the OS can. Regardless it will be more than you need and thus would satisfy your current need easily.
Sounds like you need to look at what you app might be doing to run into that issue. 25 does seem low however is your app closing it's connections after each db call?Hello,
Before freaking out and moving up, or out, you should probably ask your host for more information.
Much of the time high concurrency is caused by poor use of mysql.
Your host can tell you whether your sites generate slow queries and give you lines from the slow query log if they do.
With that information you may be able to clean up the problem by just adding an index, or tidying some code, or by archiving some older data.
Your goal should be to have almost all of your non-administrative queries complete in substantially less than one second.Goldfiles, some of my shared hosts also limit 15-20 simultaneous MySQL connections per second. I also wanted to know about dedicated servers. How much they can handle? e.g. a server with Core 2 Duo E6550 2.33GHz 4MB cache, 2GB RAM, 100Mbps link.hmm... when you reach your mysql connection limit, you might have another error, not 500 Internal Server Error message. Anyway, check out with some vendors with clustering features. They will run dedicated mysql servers, can give you more concurrent connections500 Internal Server Error message seems to be reaching out PHP or CGI limit.oh yeah, as far as i know, mysql won't return error500 when max connections were made already. error500 usually means cgi/php limit, or incorrect syntax in your .htaccessTry installing a cache module or enable it in your CMS. Doing so will allow you to handle more simultaneous requests as you wont be rendering the page for every visitor. That might enable you to keep your current host for awhile (sans issues), and give you a little time to look over the available options instead of jumping blind.Well, my website provides more information statistics and data rather than actual webpages, so there isn't much for me to cache.As far as the 500 error goes, I thought that was a bit odd, too. I don't think it is actually mysql producing the error, but rather, my web host provider temporarily turning off my account when I reach that limit. They shut down everything when I reach the 25 concurrent connections.You should ask your host exact reason for 500 error message. They can view it from the server log. If they can't, should you consider to move out?As for the number of connections a dedicated or virtual dedicated can handle, that really depends on the amount of ram you have on the server, allocated to MySQL, as well as what the client(s) connecting are doing. With 1GB like you suggested you should easily be able to handle several hundred at the least.I'd suggest looking at doing a Virtual Dedicated server first, and have the provider (assuming they offer it) do an evaluation on your MySQL configuration. Doing a little performance tuning for your setup will most likely go a long way.As for the number of connections a dedicated or virtual dedicated can handle, that really depends on the amount of ram you have on the server, allocated to MySQL, as well as what the client(s) connecting are doing. With 1GB like you suggested you should easily be able to handle several hundred at the least.
I'd suggest looking at doing a Virtual Dedicated server first, and have the provider (assuming they offer it) do an evaluation on your MySQL configuration. Doing a little performance tuning for your setup will most likely go a long way.
If you don't use innodb or bdb then you should disable them in the MySQL config. InnoDB is a memory hog and can increase the MySQL memory consumption several magnitudes (70+MB from what I have seen, without it MySQL uses about 3-7MB of ram).On a server pointed by you a max connection of 100 should work fine.But 25 is the standard. If they need more they should upgrade to a VPS.
Or get a better shared host of course, not everyone loads their servers up like their is no tomorrow and has such low limits.
1. Do mosts hosts put a cap on shared servers?
2. Is 25 standard?
3. If I moved to a dedicated server, what kind of limits can I expect in terms of max simultaneous mySQL connections?
Thanks!
BenMost hosts do place limitations on max number of SQL connections, max CPU % usage, and so on. On a dedicated server you can choose how many simultaneous connections you want, and are only limited by your hardware specifications.On a basic dedicated server, how many connections could I expect to handle? Say, a single 2.0ghz cpu, and 1gb of ram.Also, is there anyway that I can monitor my average connections myself on a shared cPanel server?On a server pointed by you a max connection of 100 should work fine.Are you using any connection pooling?100 may not enough if the customer is running bad open sourced software. There's a certain shopping cart out there that makes multiple queries with just one function...so when the search spiders come (not even actual visitors) BLAM and you got your 100.
But 25 is the standard. If they need more they should upgrade to a VPS.1. We have found this to be true as well however there are some hosts that do not limit them.
2. I am not sure but there is a number set by most hosts. Going back to point #1.
3. Depends on the OS. MySQL does not place a limit on the connections between versions but the OS can. Regardless it will be more than you need and thus would satisfy your current need easily.
Sounds like you need to look at what you app might be doing to run into that issue. 25 does seem low however is your app closing it's connections after each db call?Hello,
Before freaking out and moving up, or out, you should probably ask your host for more information.
Much of the time high concurrency is caused by poor use of mysql.
Your host can tell you whether your sites generate slow queries and give you lines from the slow query log if they do.
With that information you may be able to clean up the problem by just adding an index, or tidying some code, or by archiving some older data.
Your goal should be to have almost all of your non-administrative queries complete in substantially less than one second.Goldfiles, some of my shared hosts also limit 15-20 simultaneous MySQL connections per second. I also wanted to know about dedicated servers. How much they can handle? e.g. a server with Core 2 Duo E6550 2.33GHz 4MB cache, 2GB RAM, 100Mbps link.hmm... when you reach your mysql connection limit, you might have another error, not 500 Internal Server Error message. Anyway, check out with some vendors with clustering features. They will run dedicated mysql servers, can give you more concurrent connections500 Internal Server Error message seems to be reaching out PHP or CGI limit.oh yeah, as far as i know, mysql won't return error500 when max connections were made already. error500 usually means cgi/php limit, or incorrect syntax in your .htaccessTry installing a cache module or enable it in your CMS. Doing so will allow you to handle more simultaneous requests as you wont be rendering the page for every visitor. That might enable you to keep your current host for awhile (sans issues), and give you a little time to look over the available options instead of jumping blind.Well, my website provides more information statistics and data rather than actual webpages, so there isn't much for me to cache.As far as the 500 error goes, I thought that was a bit odd, too. I don't think it is actually mysql producing the error, but rather, my web host provider temporarily turning off my account when I reach that limit. They shut down everything when I reach the 25 concurrent connections.You should ask your host exact reason for 500 error message. They can view it from the server log. If they can't, should you consider to move out?As for the number of connections a dedicated or virtual dedicated can handle, that really depends on the amount of ram you have on the server, allocated to MySQL, as well as what the client(s) connecting are doing. With 1GB like you suggested you should easily be able to handle several hundred at the least.I'd suggest looking at doing a Virtual Dedicated server first, and have the provider (assuming they offer it) do an evaluation on your MySQL configuration. Doing a little performance tuning for your setup will most likely go a long way.As for the number of connections a dedicated or virtual dedicated can handle, that really depends on the amount of ram you have on the server, allocated to MySQL, as well as what the client(s) connecting are doing. With 1GB like you suggested you should easily be able to handle several hundred at the least.
I'd suggest looking at doing a Virtual Dedicated server first, and have the provider (assuming they offer it) do an evaluation on your MySQL configuration. Doing a little performance tuning for your setup will most likely go a long way.
If you don't use innodb or bdb then you should disable them in the MySQL config. InnoDB is a memory hog and can increase the MySQL memory consumption several magnitudes (70+MB from what I have seen, without it MySQL uses about 3-7MB of ram).On a server pointed by you a max connection of 100 should work fine.But 25 is the standard. If they need more they should upgrade to a VPS.
Or get a better shared host of course, not everyone loads their servers up like their is no tomorrow and has such low limits.