Padmini Posted November 26 Posted November 26 Could not execute function call 'Function' Unable to write data to the transport connection: An established connection was aborted by the software in your host machine. Server stack trace: at System.Net.Sockets.NetworkStream.BeginMultipleWrite(BufferOffsetSize[] buffers, AsyncCallback callback, Object state) at System.Net.Security._SslStream.StartWriting(SplitWritesState splitWrite, SplitWriteAsyncProtocolRequest asyncRequest) at System.Net.Security._SslStream.ProcessWrite(BufferOffsetSize[] buffers, SplitWriteAsyncProtocolRequest asyncRequest) at System.Net.Security._SslStream.BeginWrite(BufferOffsetSize[] buffers, AsyncCallback asyncCallback, Object asyncState) at System.Net.TlsStream.BeginMultipleWrite(BufferOffsetSize[] buffers, AsyncCallback callback, Object state) at System.Net.ConnectStream.InternalWrite(Boolean async, Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state) at System.Net.ConnectStream.BeginWrite(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state) at System.IO.Compression.DeflateStream.WriteDeflaterOutput(Boolean isAsync) at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink) Exception rethrown at [0]: at System.Net.ConnectStream.InternalWrite(Boolean async, Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state) at System.Net.ConnectStream.Write(Byte[] buffer, Int32 offset, Int32 size) at System.IO.Compression.DeflateStream.WriteDeflaterOutput(Boolean isAsync) at System.IO.Compression.DeflateStream.PurgeBuffers(Boolean disposing) at System.IO.Compression.DeflateStream.Dispose(Boolean disposing) at System.IO.Stream.Close() at System.IO.Compression.GZipStream.Dispose(Boolean disposing) at System.IO.Stream.Close() at Spotfire.Dxp.Data.DataFunctions.Executors.RemoteServiceClient.<>c__DisplayClass23_1.<RunFunction>b__1(HttpWebRequest uploadReq) at Spotfire.Dxp.Data.DataFunctions.Executors.RemoteServiceClient.<>c__DisplayClass45_0.<ExecuteDirectWebRequestWithRetry>g__RequestApplyFromParameters|0(HttpWebRequest request) at Spotfire.Dxp.Services.Http.SpotfireRequest.<>c__DisplayClass15_0.<ExecuteRequestOnSpecificSpotfireServerWithRetry>b__0() at Spotfire.Dxp.Services.Http.SpotfireRequest.ExecuteSpotfireServerRequestWithRetry(SpotfirePrincipal principal, ServerInformation server, Func`1 requestCreator, RetryOptions retryOptions) at Spotfire.Dxp.Data.DataFunctions.Executors.RemoteServiceClient.RunFunction(DataFunctionInvocation invocation) at Spotfire.Dxp.Data.DataFunctions.Executors.PythonScriptExecutor.<ExecuteFunction>d__9.MoveNext() at Spotfire.Dxp.Data.DataFunctions.DataFunctionExecutorService.<ExecuteFunction>d__8.MoveNext() Hello, I have attached the error I am getting when running Python Data Function in web. When I run this function on limited number of rows it is working fine. Issue only occurs when I pass huge data to the function for processing. However, in Analyst there are no issues. May I know what is causing this error? And also how I can solve this? Thank you.
Solution David Boot-Olazabal Posted November 26 Solution Posted November 26 Hi Padmini, Depending on your setup, it could be due to a couple of things, such as: - available resources; - is Python service installed on a separate node manager; - etc. Assuming you have not yet configured the service (and uses it's default settings), you may want/need to configure your Python service (on the web that is) and try to find a couple of settings that may affect the current error. More information on who to configure the service is found here: https://docs.tibco.com/pub/sf-pysrv/latest/doc/html/TIB_sf-pysrv_install/_shared/install/topics/configuring_the_service.html. In that same document, you can can find more information the different settings you can edit: https://docs.tibco.com/pub/sf-pysrv/latest/doc/html/TIB_sf-pysrv_install/_shared/install/topics/custom_configuration_properties.html. Kind regards, David 2
barchiel33 Posted November 26 Posted November 26 Hello Padmini! When a data function is executed in the web client, it typically uses the server's python instance. When a data function is executed in the analyst client, it instead typically uses the local python instance. My guess is that when passing data through the function in the web client and thus the server python instance, it times out the server connection if too much data is passed. You might be able to get around this by forcing the function to use the local python instance instead, but that might not work if the local PC opening the report doesn't have python installed. Outside of doing that, other solutions would be... more difficult to implement. I'm not sure how to prevent the connection from timing out since I don't typically work with server infrastructure. It might be better to either reduce the amount of data that needs to be processed in the data function, optimize the processing of the data, or break up the data into smaller bundles and execute the data function multiple times. 2
Olivier Keugue Tadaa Posted November 26 Posted November 26 Hi @Padmini, In short, as David and @barchiel33 said, it is a matter of properly sizing your nodes running the Python service and also checking all other architecture aspects such as network bandwidth before sending substantial amounts of data to be processed. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now