Scala / Slick, "Timeout after 20000ms of waiting for a connection" error Scala / Slick, "Timeout after 20000ms of waiting for a connection" error mysql mysql

Scala / Slick, "Timeout after 20000ms of waiting for a connection" error


OP wrote:

EDIT2: After further inspection, it appears that many connections were being left open, which eventually led to no connections being available. This can likely be resolved by calling db.close() to close the connection at the appropriate time.

EDIT3: Solved. The connections made by slick exceeded the max connections allowed by my mysql config.