Skip to main content


 

Symptoms


Executing a List method via K2 Management-> SmartObjects, to retrieve data that’s over 50k items from a SQL table using the SQL Server Service throws an error that "An existing connection was forcibly closed by the remote host"

Full Error:
An existing connection was forcibly closed by the remote host
Type: System.Net.Sockets.SocketException
Source:System Method Base
Member Type: Method
Name: Receive
Module
Scope Name: System.dll
Declaring Type
Full Name: System.Net.Sockets.Socket
Stack Trace:
at System.Net.Sockets.Socket.Receive(Bytey] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at SourceCode.Hosting.Client.BaseAPI.SocketBaseAPIConnection.OnReceiveBuffer(Bytey]and recvBuff)
at SourceCode.Hosting.Client.BaseAPI.BaseAPIConnectionBroker.OnReceiveBuffer(Bytey]and recvBuff)
at SourceCode.Hosting.Client.BaseAPI.BaseAPIConnection.ReceiveData(ValueTypeand hd)

However, the error does not occur if the SmartObject is bound to SmartForms i.e. you are able to use it on a View/Form to retrieve the data as expected.
Also, querying data for other tables in the same database with less than 50k records returns result as expected.
 

Diagnoses


We traced it down to the underlying service used to execute the SmartObject call. It's unable to handle the huge amount of data(over 50K items) and therefore crashes.
And, the reason this issue does not present itself when the SmartObject is leverage in SmartForms is because Appit uses a totally different method and service to execute the smartobject to render data on the View/Form.
 

Resolution

This has been logged as a defect and is currently scheduled to be fixed when Appit 1.3 Update 1 ships.
We recommend that you avoid executing the SmartObject List method directly via the K2 Management page. Instead, leverage the SmartObject is SmartForms(View/Forms) as this works as expected.
 




 
Be the first to reply!

Reply