Postgres Connection Limit Exceeded in Next.js App Using Effect and SqlClient
Has anyone seen this error with the SqlClient - it will happen after some time testing (the entire backend is Effect driven) my nextjs 14 app:
---
This is my database layer which I provide to each repository in my runtime:
And here is how I provide it to the runtime:
---
The effect versions I am using:
----
Question:
- Am I meant to teardown the connection when the runtime is finished executing the promise? I imagine what's happening is there is no connection pooling & the connections aren't closing
---
This is my database layer which I provide to each repository in my runtime:
And here is how I provide it to the runtime:
---
The effect versions I am using:
----
Question:
- Am I meant to teardown the connection when the runtime is finished executing the promise? I imagine what's happening is there is no connection pooling & the connections aren't closing
