Lost connection to MySQL during SuperAgent database purge

Document ID : KB000051463
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

When attempting to purge the SuperAgent database, the status windows displays the following message: "Lost connection to MySQL server during query".

Solution:

This problem occurs when the mysql query is taking longer than the default value specified in the web configuration file. To increase the mysql timeout value, proceed with the steps below:

  1. RDP to the SuperAgent Master Console/Standalone.

  2. Open up this file in an notepad: D:\NETQOS\SuperAgent\dotnet\Console\web.config.

  3. Search for the string: MysqlCommandTimeout.

  4. The default mysql timeout value is 90 seconds, increase the number "90" to something around "300" and save the file

    <add key="MysqlCommandTimeout" value="300"/><!-- Maximum seconds to spend executing a query -->

  5. From the Windows command prompt, type iisreset.

  6. Run the database purge again from the SuperAgent administrator. If the mysql connection still timeout, repeat the steps from 1 to 6 and increase the value in step 4. Depending on the size of the database and the amount of data to purge, the duration to complete those tasks may be very long.