arnoldasgudas / Hangfire.MySqlStorage

MySql storage for Hangfire - fire-and-forget, delayed and recurring tasks runner
GNU Lesser General Public License v3.0
174 stars 115 forks source link

Connect Timeout expired. All pooled connections are in use #84

Open eduschell opened 3 years ago

eduschell commented 3 years ago

I’m using hangfire with mysql and I get the following error message. Connect Timeout expired. All pooled connections are in use.

27fcfc812b089d47f59e905f394e7aa8b575f231

ArclightDBIT commented 3 years ago

We've seen the same happen with the latest version of Hangfire (v1.7.27)

caveofjulian commented 2 years ago

Also happening for me, software is in production. Went well for about a month, and suddenly getting these issues. I have to restart the API every hour or so. Did not update any package, version is 2.0.3.

caveofjulian commented 2 years ago

Update: closing code seems to be a clusterfuck in this library.

E.g. no using statements are being used and the following code could most definitely result in errors (why is the reference check here?). improvement must be done to have using statements internal void ReleaseConnection(IDbConnection connection) { if (connection != null && !ReferenceEquals(connection, _existingConnection)) { connection.Dispose(); } }