Unable to communicate with server - exporting from webgrid

1 reply. Last post: November 5, 2013 11:02 PM by Yudi
Tags :
  • New Discussion
  • New Question
  • New Product Feedback
Lars KnoxMember
I wanted to share a possible solution for anyone encountering this error. Unfortunately, this very general error message could mean many different issues. I'd like to share mine so the next person doesn't have to agonize over this.

We've been using the webgrid for many years. Recently we've moved our application from physical hardware to Amazon virtual servers and we are using an Elastic Load Balancer.

The symptom we kept seeing when trying to Export (a LOT of data) from our webgrid was we would wait for 60 seconds and then see the "Unable to communicate with server" error message. Debugging all of the obfuscated Intersoft javascript was a nightmare. We ultimately resorted to using Fiddler2 (highly recommended tool) and discovered the WebGrid was receiving an HTTP/504 error at the end of the 60 seconds. We also determined that the IIS server would still continue to build the export on the backend even after the browser received the HTTP/504. We discovered this after setting e.ReportInfo.CacheToDisk = true and e.ReportInfo.CacheToDiskLocation = 'c:\some\file\location' in the WebGrid_Export method in our ASPX code behind.

One definition for an HTTP/504 is "A server (not necessarily a Web server) is acting as a gateway or proxy to fulfill the request by the client (e.g. your Web browser) to access the requested URL. This server did not receive a timely response from an upstream server it accessed to deal with your HTTP request."

Then we found this forum post which indicates that Amazon Elastic Load Balancers have a 60 second timeout: https://forums.aws.amazon.com/thread.jspa?messageID=491594#491594

The problem is, there is no way to observe or change the 60 second timeout on the ELB from the AWS console or API. You MUST file a support ticket with Amazon (which might require a support CONTRACT) in order to raise the timeout up to a maximum of 17 minutes.

Once our support request was completed, another retest and all of our WebGrid exporting began to work beyond the 60 second ELB timeout.

Hope this helps someone else.

L

All times are GMT -5. The time now is 3:47 PM.
Previous Next