Portal Home > Knowledgebase > Articles Database > more number of concurrent users in a shared vps mysql server
Posted by ang_kavitha, 11-23-2011, 01:53 AM Hi All, We have developed a web portal which has large volume of data & more number of concurrent users (say around 200 concurrent users). The application is deployed in an online vps shared hosting. Often we are getting the Too Many Connections error. Below are the details of max connections max_connnections = 200 max_user_connections = 20 Whenever we face the too many connections error, if we check the status, it shows max_used_connections = 201. I don't understand the max_used_connections - whether it is the total number of queries triggered simultaneously? What is meaning by a connection in mysql? whether it is the connection established each and every time the mysql_connect runs. To improve the application performance and to allow more number of concurrent user (more than 200) - what shall we do? Do we need to go for the dedicated server to overcome the issue. Please help. Thanks in advance
Posted by iexo, 11-23-2011, 02:23 AM A connection is a query, including the response and execution, So from the start to end of a query, is one connection. Some scripts force queries to queue per user, some allow them concurrently, but this all depends on the whole aim of the process, the mysql configuration and also server spec. To fill up the 20 limit you have now, 20 user queries would need to be running all at once. You'll need to increase both of these numbers, however I couldn't record to what amount without knowing what features this forum has and what uses mysql. I personally have the mysql queue method in use on sites of mine that allow it, but only for write queries, simply because it cuts down concurrent connections giving read only queries more room to breath, which is what I need on blogs etc, where reading from the DB is more of a priority than writing to it. To add, I don't believe you need a dedicated server, but again without knowing what functions your web portal has, I can't give a strong opinion in ragards to that, as for optimizing your MySQL, find the my.cnf file, even post some of it here if you like, so that you can gain further feedback and possible configuration change suggestions. Last edited by iexo; 11-23-2011 at 02:36 AM.
Add to Favourites Print this Article