DEV Community

Discussion on: Fix "too many connections" errors with database clients stacking in dev mode with Next.js

Collapse
 
jdunk profile image
jdunk

Thank you!!!! This had been bothering me for weeks, and just now I also just spent hours trying to find any explanation for why Next.js (at least in dev mode) seems to be compiling and restarting on every single http request, even without any changes between requests. Finally, a solution! This really needs to be documented somewhere. Who knows how much time you just saved me. Muchas gracias!

Collapse
 
noclat profile image
Nicolas Torres

I'm glad it helped! Had a lot of trouble myself to find a solution.