NAV2009 R2 -Sending BigText data by web service is very long

Sebi64Sebi64 Member Posts: 13
edited 2014-05-15 in NAV Three Tier
Hi guys !

I developed a web service on Dynamics NAV 2009 R2 and the response time of the service is unusually long.

In the codeunit of the webservice I only save the XML stream in the SQL Server database :
PROCEDURE ImportXml@1000000001(inputXml@1000000000 : BigText) : Text[30];
    VAR
      criAttXml@1000000005 : Record 50021;
    BEGIN
      SaveInputXml(inputXml, criAttXml);
      EXIT('Import Ok.');
    END;

    LOCAL PROCEDURE SaveInputXml@1000000003(inputXml@1000000000 : BigText;VAR CriAttXml@1000000003 : Record 50021);
    VAR
      xmlOutStream@1000000002 : OutStream;
    BEGIN
      CriAttXml.INIT;
      CriAttXml.Xml.CREATEOUTSTREAM(xmlOutStream);
      CriAttXml."Taille Xml" := inputXml.LENGTH;
      inputXml.WRITE(xmlOutStream);
      CriAttXml.INSERT(FALSE);
    END;

Here is the response times that I noted :
XMLsize webservice response
982kb 3'41''
1396kb 7'51''

To eliminate potential problems of network bandwidth, I did the same test locally on the server hosting the web service.
Processing times are the same!

If I look at the traces in SQL Server Profiler:
- I see the queries to connect to Dynamics
- Then I have a period where nothing happens for more than 3 minutes (with the 982 kb file).
- Then I see the queries to store the data in the table that is almost instantaneous.

The same process without the web service, like reading the xml stream from a file and saving it to the database is ok and fast.
I'm really stuck with this issue so any advice is welcome to improve the processing time.
Or at least do you have any clue to find where is the bottleneck ?
Could it be a network authentication problem ?

Thanks for your help !

Our configuration runs with 4 virtualized servers :
- The NAV server,
- The SQL server,
- The RTC server,
- The web service server.

Answers

  • mdPartnerNLmdPartnerNL Member Posts: 802
    You need to eliminate it more. Send me a pm if you need help testing.
  • Sebi64Sebi64 Member Posts: 13
    I never found where was the problem but I sent compressed datas as a workaround and it works fine.
Sign In or Register to comment.