I tried to create a DB class to persist my connection. The problem is that with each request, it initializes a new connection and after a while I receive this error: