To avoid reaching the connection limit, please consider the following options:
- Upgrade to a plan with more connections.
- Use a connection pool:
Without connection pooling, each request opens a new connection. This exposes you to many possible momentary problems that could prevent the opening of the connection. In addition, if you make many requests, you will be frequently opening and closing connections, operations which might fail from time to time.
Using connection pooling, you will be opening a few connections that will serve all requests, and will not close after each request. This eliminates the problems above and will also give you better performance because no time will be wasted on opening and closing connections.