In most cases, max_connections does not need to be increased. MySQL servers that are exceeding the default number of maximum connections typically have other performance issues that need correction.
In situations where increasing max_connections is appropriate, increasing max_connections by 100 connections at a time, until there is no longer a 'too many connections' error message.
When adjusting max_connections, it's important to consider the system's resources. What is the available RAM? What kinds of queries will the connections be using? This plays into how much RAM is used by each connection, as easy queries take significantly less RAM than other resource-intensive queries. Improperly setting max_connections too high will have detrimental impacts on RAM availability and query performance.
Try to increase open_files_limit
in case you can't increase max_connection variable.