Database Connection Fault

Cannot get a connection, pool error Timeout waiting for idle object

I keep getting this error every so often where the gateway loses connection with the database and takes some time to reconnect. Is there something causing this to happen every so often that I am not aware of/what is the best way to handle this issue?

Quoting @Carl.Gould :

This error simply means that the connection pool is full (all connections in use), and no connection became available within the timeout. (the size of the pool and the time to wait are parameters of the connection.

By default the pool has a max of 8 connections. This is sufficient for most applications. The presence of this error typically means one of two things:

  1. You’re running a bunch of queries that are taking a long time to complete, thus they’re filling up the pool. This is usually caused by poorly optimized table layout (lack of indexes)
  2. You’re just running too many queries in general. This is often caused by mistakenly not using the “swap” navigation technique, resulting in many windows being open in the background simultaneously on the clients.

I'd start with checking the database displays on the Status pages of the gateway.

Okay that makes sense but when I check the connection it says 0/8 connections in use, is there an easy way to get it back online when this happens?

There’s nothing wrong with 0/8. did you look at the details? It will list your longest running recent queries. I’m not sure how long of a window that is, I’m guessing about an hour.
This is a snapshot of one of my busier connections. Most of the time it will show 0/8, occasionally bumping up more, but the graph and the query list may give you a clue.