Too Many Connections MySQL2 + NextJS
I’m currently experiencing some issues with my API. It works well for the first few requests, but after a while I end up getting a Too Many Connections
Error causing my entire Database to crash as well. Only after stopping my project and doing npm run dev
does it fix itself. For certain pages I fetch from multiple endpoints and on some pages I make post, put and delete requests numerous times. Though the one with the most requests in one go doesn’t give me this issue. I will provide the simplified versions underneath.