[Solved] Error: MySql.Data.MySqlClient.MySqlException: Too many connections

on Jul 03, 2022 11:10 PM

I publish my product for testing to IIS on my 2016 Windows server

when I run the login screen then the menu I am getting an errror which  I have not had before then is only 1 connection so could you advise

Too many connections
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: MySql.Data.MySqlClient.MySqlException: Too many connections


Download FREE API for Word, Excel and PDF in ASP.Net: Download
on Jul 03, 2022 11:19 PM
on Jul 03, 2022 11:20 PM

Hi kevinf,

It seems that you have many open connections that are not closed. So implement the USING statement to dispose the connections, to make sure that they are closed as soon as possible.

Refer below article for more details.

Connect (Bind) GridView to MySql database in ASP.Net using C# and VB.Net