Amazon EC2 Instances Times Out When Connecting to SQL Server RDS (NIC configurations)

Amazon EC2 Instances Times Out When Connecting to SQL Server RDS (NIC configurations)

  
Sometimes when running the OutSystems Platform in Amazon EC2 and using SQL Server RDS as database server, you may experience errors related to timeouts.
Usually you see messages like:
 
"Could not assign '' to 'Solution_Pack.Content'... A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired."
 
This can be caused by some default configurations. 
 
To overcome this, Amazon recommends to update the Citrix PV drivers and Ec2config services to the latest version.
For Ec2config services updates you can follow the steps included in this article:
 
For Citrix PV Drivers updates you can follow the steps included in this article:
 
As an alternative, you can follow these procedures:
 
  1. Remote Desktop the Front-End server
  2. Access Control Panel\Network and Internet\Network Connections
  3. Right-click the network adapter that reaches the SQL Server and select Properties
  4. Press the Configure button
  5. In the Advanced tab, select the following settings* and set them to disable:
  • IPv4 Checksum Offload
  • Large receive Offload (IPv4)
  • Large Send Offload (IPv4)
  • TCP Checksum Offload (IPv4)
* note that the name of the settings may differ slighty depending on the installed driver and vendor.

 6. Close all dialog boxes with OK button (network connectivity will be momentarily lost).
 
To learn more, check this forum post: https://forums.aws.amazon.com/thread.jspa?messageID=476636.