Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ServiceStack encountered exception: The underlying connection was closed: The message length limit was exceeded

I have a client-side application, consume web service from server.

In one form of the application, it shows a list of tables, whose statuses are from the server, the form refreshing every 1 second. So it is acting like a real time page of all tables information.

However, after leaving the form there for about 20, 30 minutes, it starts to throw "The underlying connection was closed: The message length limit was exceeded".

I saw blog in http://code.logos.com/blog/2012/01/webexception-the-message-limit-length-was-exceeded.html, about setting the MaximumResponseHeadersLength, but I use ServiceStack, not sure where to set it, or how to solve this issue. Can anyone please help?

public IList<Table> GetAllTables()
{
   return ServiceClient.Get<EntitiesResponse<Table>>("/tables").Entities;
}
like image 752
user1869901 Avatar asked Dec 02 '12 06:12

user1869901


1 Answers

I was experiencing the same issue when using Apache Benchmark to test a few webservices running on ServiceStack.

I was able to get rid of the error by disabling the MiniProfiler.

like image 135
Carlos Mendes Avatar answered Sep 29 '22 02:09

Carlos Mendes