NAS freezes with heavy import at CREATEOUTSTREAM

Hi all,

I'm facing an issue that drive me crazy, I hope I can find the answer among all you experts. :)

We are running NAV2009R2 with a Navision Application server that run as a windows service.

When we do import documents via NAS, sometimes, the import just freeze in the job queue with status "In progress", to solve that, we do restart the NAS windows service and then the import continues. When I restart the service, I get "Error 109, The Pipe has been ended".

Added some log lines in the code to see where it stopps. I can see it always stopps at "rRequest.Data.CREATEOUTSTREAM(RequestOutStream)"

Along with the import, we do a SOAP request in a separate codeunit where the code execution freezes.

rDataLog.INSERT(TRUE);

Dlg.Update(4, 'Create SOAP request...');

SLEEP(10);

CLEAR(btSoapEnvelope);
btSoapEnvelope.ADDTEXT('<?xml version="1.0" encoding="utf-8"?>');
btSoapEnvelope.ADDTEXT('<soapenv:Envelope ');
.
.
btSoapEnvelope.ADDTEXT('<soapenv:Header>');
.
.
btSoapEnvelope.ADDTEXT('</soapenv:Header>');

btSoapEnvelope.ADDTEXT('<soapenv:Body>');
.
.
btSoapEnvelope.ADDTEXT('</soapenv:Body>');
btSoapEnvelope.ADDTEXT('</soapenv:Envelope>');

rRequest.Data.CREATEOUTSTREAM(RequestOutStream);
btSoapEnvelope.WRITE(RequestOutStream);

rRequest.Data.CREATEINSTREAM(RequestInStream);

xmlhttp.open('POST', 'https:\\soapEndPoint');
xmlhttp.setRequestHeader('Content-Type', 'text/xml; charset=utf-8');
xmlhttp.setRequestHeader('SoapAction', rType."Soap Action");

xmlhttp.send(RequestInStream);
xmlhttp.waitForResponse(500);

Dlg.Update(4, 'Wait for an answer...');
SLEEP(10);

xmldomResponse4 := xmlhttp.responseXML;

xmldomResponse4.save(ResponseOutStream);

rDataLog.Response.CREATEOUTSTREAM(osResponse);
xmldomResponse3.save(osResponse);

rDataLog.MODIFY;
COMMIT;


The strange thing is there are two companies in the same database. And the problem occurs only in one of them.

The problem occurs usually along with heavy import. There is no problem with few documents but when NAS import too many documents, the probability is much higher that the problem will occur.

What I tried:
* Uninstall NAS service and reinsall it.
* Create a new service user and changed the user running the NAS service.
* Checked any deadlocks in the database. Using extended events and SQL profiler.
* Followed the SOAP request using Wireshark and Fiddler.
* Used Process monitor to see if there are any thread block.
* Checked Event Viewer.

None of the above showed any hint where is the problem.

Googled a lot and the most similar case is here: https://forum.mibuso.com/discussion/49235/nas-getting-stuck-when-ran-as-service
The common thing is that the user has proxy settings in internet options.

Any idea, hint?

Answers

  • jesperkenborgjesperkenborg Member Posts: 9
    Well, the quick work-around solution is of course to ensure you never have to perform heavy import :smile:

    Maybe it could be related to your NAV 2009R2 version. Are you on build 6.0.38655 ?
  • GhaiathOgtGhaiathOgt Member Posts: 4
    Thanks @jesperkenborg,

    We actually have all documents in one file, and will be a bit harder to separate it apart. But yes, I agree, it's a work-around. :)

    Version we use: 6.00.32942.
  • jesperkenborgjesperkenborg Member Posts: 9
    If it will be hard to separate, then I suggest you start out with the build upgrade to 6.0.38655 :smile:
  • ftorneroftornero Member Posts: 522
    Hello @GhaiathOgt,

    You could try to use an XML Document instead an OutStream/Instream and see what happens.

    I mean this type of variable
    Name	DataType	Subtype	Length
    XMLDoc	Automation	'Microsoft XML, v3.0'.DOMDocument	
    

    You can create the SOAP document with that variable and send it the same way you are doing now.
    xmlhttp.send(XMLDoc);
    

    Regards.
  • GhaiathOgtGhaiathOgt Member Posts: 4
    Thanks @ftornero. I'll give it a try.
  • GhaiathOgtGhaiathOgt Member Posts: 4
    I tried to install last version of Nav2009 R2 from Microsoft partner website but I got an older version than 6.0.38655. @jesperkenborg Do you know where I can install last build version of Nav2009 R2? I it 6.0.38655?
  • ftorneroftornero Member Posts: 522
    Hello @GhaiathOgt,

    The XMLDoc also didn't work ?

    Regards.
Sign In or Register to comment.