Problems with memory use are frequent when working with AWS RDS MySQL. The max connections parameter could be the reason.
Instead of relying on the default parameter group, it is recommended to utilize a custom parameter group. Using a customized instance-level parameter group, increase the value of the max connections parameter.
There are no outages when the max connections option is increased. Although the value of max connections can be raised above the default number, doing so is not recommended. This is due to the possibility that the instance may experience problems when the demand grows and more memory becomes necessary. Memory use may rise as the number of connections rises. Running out of memory could cause instances to crash.
Apart from that you may encounter incompatible parameter errors in your log.
The best solution is to provide the formula instead of a figure. The formula is –
The amounts reserved for the operating system and the RDS processes that control the instance are automatically subtracted from the value of the variable DBInstanceClassMemory. This means, if your RAM is 16GB (17,179,869,184 bytes) then the maximum number of connections is approximately 1,350. And if your RAM is 32 GB the max connections could be around 2700.
Hope you find this article useful.