10
Views
1
Comments
[XML Records] XMLRecords Component fails on larger files
xml-records
Service icon
Forge component by Afonso Carvalho
Application Type
Service
Service Studio Version
11.54.27 (Build 62849)

We are trying to import a large XML File (about 300MB) using the XMLRecords Forge Component within a timer. The timer always fails when trying to use the XmlToRecordList Action with the following Error: 

[1] The underlying connection was closed: An unexpected error occurred on a receive. at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request) at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at OutSystems.Scheduler.Core.TimerHandler.ExecuteTimer(String ssKey, Int32 timeout, Int32 tenantId) at OutSystems.Scheduler.Core.TimerJob.Execute() at OutSystems.Scheduler.Core.SchedulerProducerConsumer`1.Execute(Job job) 

[2] Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead) 

[3] An existing connection was forcibly closed by the remote host at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) 

Importing a small chunk of data from the large XML File works without problems, so the problem shouldn't be with the mapped data structure.

When run as a server action without a timer, the request fails with status 502 and the following error message:

CommunicationException: Request failed with status 502    at c.onSuccess (https://ssnmgc-dev1.outsystemsenterprise.com/XpertAdmin/scripts/OutSystems.js?RnlDcii3Xz75iIHHERIZtA:3:6619)    at XMLHttpRequest. (https://ssnmgc-dev1.outsystemsenterprise.com/XpertAdmin/scripts/OutSystems.js?RnlDcii3Xz75iIHHERIZtA:3:2648)


Screenshot of timer logic below:


Hello Roman,

I admit I've never attempted to process individual 300mb files with the component! However, looking at your stack trace, I don't see anything specific to the XML Records extension - it looks like a garden variety timeout (the server just gave up). I'm not sure why it's presented as a network timeout.

There's a way for you to rule out the component itself - you can create a Console Application in Visual Studio on your local computer, consume the XML Records extension directly, and then attempt to process your file, excluding any network/platform dependencies from the process.

Regardless on whether you do successfully rule out issues with the component, I don't think it will be feasible to process a 300mb file in one go. Are you generating it elsewhere or is it being provided to you? Would it be possible to split it in smaller portions?

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.