Re: Too Many Connections - ADO.NET pooling issues (C#)
Posted by: Jay Haynes
Date: July 06, 2020 03:33AM

As a test, I also wrote some code to access the database and kill off any idle connections.

When I run this code, the first time I often see:

Error: MySql.Data.MySqlClient.MySqlException (0x80004005): Connection was killed at MySql.Data.MySqlClient.MySqlStream.ReadPacket() at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId) at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId) at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force) at MySql.Data.MySqlClient.MySqlDataReader.NextResult() at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) at MyDAL.MySQLSecondary.Execute.ExecuteSQL(String sql) at Mylasses.Controllers.MySQLController.Execute(String connection, String sql) at type)

If I run the code again a few seconds later, it kills all the connections and I have no errors.

Options: ReplyQuote

Written By
Re: Too Many Connections - ADO.NET pooling issues (C#)
July 06, 2020 03:33AM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.