Wednesday 26 November 2014

AWS EC2 VPC - RDS Error: The semaphore timeout period has expired

This issue is caused by TCP offloading on some Windows EC2 instances which connect to SQL Server DB instances. We need to disable TCP Offloading on your EC2 Instance(s) and perform a reboot to resolve the issue. 

The following aligns with Microsoft's guidance as outlined in the KB article: http://support.microsoft.com/kb/942861

  • Bring up the "Network Adapters" by opening "ncpa.cpl" (type at a Run prompt or in the Start Menu's Search box)
  • Right click the "Local Area Connection" and select "Properties"
  • Click the "Configure" button
  • Select the "Advanced Tab"
  • Select the following five "Properties" and set the "Value" to "Disabled" (See attached screenshot highlights)
                * IPv4 Checksum Offload
                * Large Receive Offload (IPv4)
                * Large Send Offload Version 2 (IPv4)
                * TCP Checksum Offload (IPv4)
                * UDP Checksum Offload (IPv4)
  • Click "OK" to close the dialog box, then close the "Network Adapters" window
  • Run the following script from a command prompt to set global TCP offload settings:

                C:\> netsh int ip set global taskoffload=disabled
                C:\> netsh int tcp set global chimney=disabled
                C:\> netsh int tcp set global rss=disabled
                C:\> netsh int tcp set global netdma=disabled

Alternative to .NET Reflector

For those of you who miss .NET Reflector (since Redgate took down the free version in 2011), there is a pretty good open source alternative: ILSpy.

The tool is designed around the original Roy Osherove’s .NET Reflector and supports all its major features including intermediate language disassembly, reflection (browsing), decompilation to C#.

It is a pretty decent IL decompiler.