박연호
PPrisma
•Created by 박연호 on 1/3/2025 in #help-and-questions
About recommended connection pool size
vm cpu: 15
prisma: 6.1.0
mysql 8.0.18
mysql max_connections: 4030
I have a question because I have a different opinion with my colleague regarding the connection_limit value.
I am running 15 servers as a cluster with the express app on docker on a gcp vm instance.
Docker is running on the gcp vm , and 15 (number of CPUs) express apps are running on docker.
The questions are as follows:
1. What should be the connection_limit value of each express app? 2~3(15*2+1/15) or 31
2. Why is the number of CPUs relevant when calculating the number of connection pools? (My guess is to make as many connections as the CPU can handle?)
3. If one express server processes many query requests, a pool timeout is likely to occur if the connection_limit value is set to 2~3. In this case, should I increase the pool timeout value or connection_limit? (while testing)
3 replies