How to increase Max_used_connections? I have a registration application. 10000 people want to access the server but only 3000 quotas available. 3000 users registered successfully online within 3 minutes on the registration day. However, some users encounter 504 error page (Gateway time out). I checked the max_used_connections variable, the value is 10 only. The max_connections value is 151.
The max_used_connections is defined as

the maximum number of connections that have been in use simultaneously since the server started.

I wonder why the value is only 10. Is it too small compared with 3000 users registered successfully online within 3 minutes?
Change the configuration file to increase max_connections.  But be aware that that can increase RAM usage.  How much RAM do you have?  What is the value of innodb_buffer_pool_size?
You must streamline the &quot;registration process&quot; as much as possible.  Please provide all the SQL that happens for registration so we can help optimize it.
Max_used_connections is a &quot;high water mark&quot;.  You never had more than 10 connections at the same time, at least not since the last restart.  10 is fine.  And it cannot be changed.  Since it is much smaller than Max_connections (151), there does not seem to be an issue.  10 connections at a time is fine.
Look at the STATUS Connections.  That is a &quot;counter&quot; that has been running since restart.  It will probably say more than 3000.  3000 in 3 minutes is only 17/second, not difficult if the registration process is simple.
The timeout probably indicates something else -- such as too much data flowing across the network.  Does registration involve showing some biggish images on the registration page?
Instrument your registration process to see how many milliseconds the whole process takes, and how long each SQL statement takes.
What was the value of max_user_connections?