Troubleshooting the error: "The underlying connection was closed. A connection that was expected to be kept alive was closed by the server."
Who is this article for?
Users experiencing the specified error.
IT access is required for resolution.
If the desktop application displays the error "The underlying connection was closed. A connection that was expected to be kept alive was closed by the server.", it usually indicates:
- Users are connecting to Ideagen Internal Audit as normal.
- The corporate firewall or antivirus may mistakenly close the connection after a period of inactivity.
- The message "(...)was closed by the server" is misleading; the issue typically lies with a firewall between the client PC and the server.
Crashes can appear random or can occur consistently (e.g. during file uploads).
This error may also arise if the server is busy for an extended time.
To investigate this issue:
- First, check the server as outlined in section 1 below.
- Then, check the network.
1. Less common cause: server stress
1.1 High CPU usage on the application server may cause this error.
To check/resolve:
- Log into the application server.
- Open Task Manager.
- Sort processes by CPU %.
If CPU usage is at 99% or higher for a prolonged period, investigate the processes. If the Robot service (Pentana.Tng.ServerRobot.RobotService.exe) or IIS (w3wp.exe) is causing the issue, consider restarting:
- The Ideagen Internal Audit (Aura) app pool
- The Server Robot Pentana Windows service
1.2 Slow autogrowth of SQL Server data files can also cause this behaviour.
If users are unable to save data or add attachments, and there are frequent timeout errors in the application service log at Service\PentanaTngService.log then then this likely relates to autogrowth. The following article contains further information on that problem:
2. Most common cause: firewall/antivirus
2.1 Associated error messages
The error may also read: "Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."
If the server's antivirus is the issue:
- The Ideagen Internal Audit (Aura) app pool may stop.
- The Windows Event Viewer logs an APPCRASH event for w3wp.exe alongside client errors.
2.2 Solution
Your IT team should check firewall and antivirus logs on the application server to confirm the cause.
Both should whitelist these application endpoints:
- [server name]/[instance name]/Service/TngService.svc
- [server name]/[instance name]/Service/TngFileService.svc
2.3 Workaround
If your server is hosted by Ideagen, try connecting via a home network rather than your corporate network.