cancel
Showing results for 
Search instead for 
Did you mean: 

DI SERVER HANG

divyanshuvyas
Explorer
0 Kudos

Dear All,

About by Application:

We have developed & deployed a WEB-Application (using ASP.NET), which interact with DI Server for concurrent POSTING of SAP B1 transactions (See below).

1. Goods Receipt

2. Goods Issue.

3. Goods Receipt PO.

4. Goods Return

5. Inventory Transactions (BIN & Warehouse).

6. Delivery.

7. Sales Picking.

A part from above, we are updating many UDOs via DI SERVER.

My web application is used by many SAP B1 users (around 60 Users), Who submits above transactions at periodical interval of 4 to 5 minutes (Approx.).

Issue:

My application works perfectly well, if number of users are less (around 20 to 30) if logon via DI SERVER. If more 30 user’s logons via DI SERVER, then the memory consumption increases (around 1600 to 1700 MB of DI Server) & DI server Crashes automatically. Here we need to restart the Windows service again & again, which is what my customer does not prefer & they threatened to leave this solution for future use.

In addition to above, we have checked so many parameters like: H/w Configuration [Windows Server 2016 (Datacenter) (64 bit Operating system) Intel (R) Xeon(R) CPU E5-2686 v4 @ 2.30 GHz, RAM:60 GB], Our code, Other exercise (Reinstall of SAP Server Tools) etc, but still DI Server hangs when number of users exceeds from 30 to 60 users and doing above transactions at a periodical interval of 4 to 5 minutes.

Note: In our solution, we are doing logon for each transaction & immediately logout after successful transaction assuming that DI Server release the occupied memory.

Kindly suggest solution against this issue.

Regards

Divyanshu Vyas

divyanshuvyas
Explorer
0 Kudos

In addition to above I am using SAP 9.2 PL-09

Accepted Solutions (1)

Accepted Solutions (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert

Hi Divyanshu Vyas,

Below is my experience and recommendation about DI Server usage:

1. Multi-threading is not supported for DI API. Make sure the threads are managed such that it does not interfere with the DI operations. Otherwise this could lead to unexpected crashes.

2. For the best memory handling consider below recommendation:

  • Declare & instantiate COM objects at the last moment possible.
  • ReleaseComObject(obj) or FinalReleaseComObject(obj) for ALL objects, at the soonest moment possible.
  • Always ReleaseComObject(obj) or FinalReleaseComObject(obj) in the opposite order of creation.[First created Last destroyed]
  • NEVER call GC.Collect() except when required for debugging.

3. Check the SAP Note 722337 for the limitations in DoQuery() method. You can use direct ODBC queries if the queries are complex to run on DoQuery().

4. DI Server is a 32 bit application, it cannot use more than 2 GB of memory [This is OS restriction]. But in real world it may hit a snag (in real world, this limit will be hit much earlier) at 1.2 GB and restart might be required. Your solution to restart the service regularly is correct and it is recommended.

5. Enable the DI Server logs and check which particular request causes memory leak.

set the ExtendedDIServer logs.

=> Service manager -> DI Server -> Setting -> You can set the log file path,

=>Service manager -> DI Server ->Setting -> Select Extended logs option

=> Restart the DI Server Service.

6. It would be good to split the load between 2 or more DI Server. By splitting the load the DI Server will have much lesser request to process and more time for .Net garbage collectors to clear the memory. In this case, you may have to need new licenses + machine for the 2nd DI Server, also would suggest regular restart.

Hope it helps!

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

divyanshuvyas
Explorer
0 Kudos

Hi Ankit

Thanks & really appreciate your help for above queries.

We have already maintained all the suggestion & Scenarios explain in point#1 to point#3.

Please see my comments for your recommendations that we follow in our solution. I have identified few more results after doing research in past two days for point # 6 (See in bold letters) . I need your advice for this.

4. DI Server is a 32-bit application; it cannot use more than 2 GB of memory [This is OS restriction]. But in real world it may hit a snag (in real world, this limit will be hit much earlier) at 1.2 GB and restart might be required. Your solution to restart the service regularly is correct and it is recommended.

Your suggestion for this point is correct & We will prepare a solution to force restart DI Server if Hangs or stopped.

6. It would be good to split the load between 2 or more DI Server. By splitting the load, the DI Server will have much lesser request to process and more time for .Net garbage collectors to clear the memory. In this case, you may have to need new licenses + machine for the 2nd DI Server, also would suggest regular restart.

I tried one more solution, to prevent increasing memory of DI SERVER. With a sample code I tried submitting concurrent transaction by single SAP B1 proxy user, means we can have separate users for logon (Basically for authentication) & while submitting the transaction to SAP B1, I use a single user (i.e. manager)[logon for each transaction & immediately logout from DI SERVER]. Doing this DI Server consumes less memory (nearly half amount of memory 700 to 800 MB for 50 to 60 Users).

I really don’t know, approaching this solution will affect several SAP B1 business process ?

Kindly let us know your views on this.

Regards

Divyanshu Vyas

divyanshuvyas
Explorer
0 Kudos

Thanks Anikit for your multiple solution for this case.

I have followed the rules explained in point#6

"It would be good to split the load between 2 or more DI Server. By splitting the load the DI Server will have much lesser request to process and more time for .Net garbage collectors to clear the memory. In this case, you may have to need new licenses + machine for the 2nd DI Server, also would suggest regular restart."

This one is good suggestion and working in high transaction from any web environment.

Thanks

Regards

Divyanshu Vyas

Answers (0)