简体   繁体   中英

IIS10 - MySQL Database Disconnection - An unhandled exception has occurred ( Event id 1309 )

Image

Hi, I'm Getting the below error message and could not able the site. after restarting the IIS site gets reconnected.Please let me Know the Solution for the error.

Log Name: Application

Source: ASP.NET 2.0.50727.0

Date: 28-06-2019 10:55:30 AM

Event ID: 1309

Task Category: Web Event

Level: Warning

Keywords: Classic

User: N/A

Computer: PSPINTRANETSVR.root.com

Description:

Event code: 3005

Event message: An unhandled exception has occurred.

Event time: 28-06-2019 10:55:30

Event time (UTC): 28-06-2019 05:25:30

Event ID: c8f21b66d0f6484ea19410b52b9d4f50

Event sequence: 509

Event occurrence: 4

Event detail code: 0 Application information: Application domain: /LM/W3SVC/2/ROOT-1-132061709909075750 Trust level: Full Application Virtual Path: / Application Path: D:\\IIS\\PIMS WEBINTERFACE\\www\\ Machine name: PSPINTRANETSVR Process information: Process ID: 4736 Process name: w3wp.exe Account name: IIS APPPOOL\\WEBINTERFACE Exception information: Exception type: InvalidOperationException Exception message: Connection must be valid and open Request information: Request URL: http://site Request path: / User host address: 000.000.0.000 User:
Is authenticated: False Authentication Type:
Thread account name: IIS APPPOOL\\WEBINTERFACE Thread information: Thread ID: 9 Thread account name: IIS APPPOOL\\WEBINTERFACE Is impersonating: False Stack trace: at MySql.Data.MySqlClient.MySqlCommand.CheckState() at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery() at _Application._application.get_department() in D:\\Working Folder\\Working Projects\\Application\\new\\Application\\Application\\database.cs:line 101 at Application.pims.Page_Load(Object sender, EventArgs e) in D:\\Working Folder\\Working Projects\\Application\\new\\Application\\Application\\pims.Master.cs:line 40 at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessReque stMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) Custom event details:

Event Xml:
1309 3 3 0x80000000000000 4137 Application PSPINTRANETSVR.root.com 3005 An unhandled exception has occurred. 28-06-2019 10:55:30 28-06-2019 05:25:30 c8f21b66d0f6484ea19410b52b9d4f50 509 4 0 /LM/W3SVC/2/ROOT-1-132061709909075750 Full / D:\\IIS\\PIMS WEBINTERFACE\\www\\ PSPINTRANETSVR 4736 w3wp.exe IIS APPPOOL\\WEBINTERFACE InvalidOperationException Connection must be valid and open http://site/ /project_complete.aspx 192.168.0.000 False IIS APPPOOL\\WEBINTERFACE 9 IIS APPPOOL\\WEBINTERFACE False at MySql.Data.MySqlClient.MySqlCommand.CheckState() at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery() at Application.application.get_department() in D:\\Working Folder\\Working Projects\\Application\\new_Application\\Application\\database.cs:line 101 at Application.pims.Page_Load(Object sender, EventArgs e) in D:\\Working Folder\\Working Projects\\Application\\new\\Application\\Application\\Master.cs:line 40 at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHand lerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

This Problem solved by increasing the value of max_connections in MySQL

1.Check how many users connected your Database

 show status like 'max_used_connections';

2.Check your default max connection range

show variables like 'max_connections';

3.Set the max connection value whatever you want but the max range is 100000

set global max_connections = 100000;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM