Troubleshooting Advice For SAP Business One DI Server Issues

Troubleshooting-Advice-for-SAP-Business-One-DI-Server-Issues

SAP DI (Data Interface) Server is a technique for communicating DI Server with external components. The DI Server exposes a set of APIs, which help users retrieve data from SAP B1 efficiently. It is a tool that hooks into the system where SAP B1 is installed, providing a set of APIs you can call to get or push data. The external application that needs to access data through the SAP Business One DI Server needs to be installed on the same machine where the DI Server is installed. Once you have the application running on the server, you can take reference of the DI Server Interop dll to get a list of APIs. You can call the DI Server using either Object API, where concrete API object model is defined, or using SOAP over TCP. We recommend the 2nd approach as it gives users the flexibility to call any data using SQL Syntax.

DI Server is an old interface provided by SAP which is currently in passive support. Hence the DI Server issues will never be resolved, so you need a workaround to solve them and use it in live projects. On the other hand, the SAP Business One Service Layer is a new generation of extension API for consuming SAP Business One objects and services via web services with high scalability and high availability. Thus, it is not recommended to use the DI Server for new installations and only go for it if there is no other option.

How to find SAP Business One DI Server in your system?

If you already have DI Server installed, you can go to Taskbar and see if the active SAP B1 Service Manager tool is present or not. If it is present, you can open the tool and check for the DI Server Component.

SAP-Business-One-DI-Server-Service-Manager

The service manager tool will help you Start / Stop the DI Server module, configure it, change different settings, etc. It will also help you to handle other services like backup service, license server, etc.

DI Server restart is a common phenomenon. DI Server often stops responding and requires the customer to restart it. This happens either based on the load of data in the service, recurrent errors, or occasional resource crunch in the system. It is important to identify whether it needs a restart or not.

Common errors of DI Server indicating a restart

Let us look at some of the errors that can indicate that restarting the DI server is your only option.

  1. Error: Failed to connect SLD, make sure SLD server is correct and available
    Cause:
    Although this error can indicate that the Database name is invalid and could not connect directly through DI API, it can also occur when DI Server stops responding.
  2. Error: DI Server Connection failed – Resource Error
    Cause:
    The DI Server Resource Error indicates that the DI Server stopped responding. The fix to this problem would require a DI Server restart.
  3. Error: Failed to load observerDLL.dll/Unable to initialize OBServerDLL.dll
    Cause:
    DI Server extensively uses observer.dll to track changes. Now if there is an issue in loading the dll, the DI server might throw this error. But even if there are no dll loading issues, this error can still arise when the DI Server stops responding.
  4. Error: Failed to generate Session
    Cause:
    This error generally occurs when there is a communication issue between the database and the DI Server module, but it can also happen when the DI Server does not respond.
  5. Error: Retrieving the COM class factory for component with CLSID {F3D77DAE-6C14-426E-B56F-C550BDE8B09D} failed due to the following error: 800700a4 No more threads can be created in the system. (Exception from HRESULT: 0x800700A4)
    Cause:
    This error indicates an installation issue, but if you look closely, the 2nd part of the error says it cannot create any new thread. This usually indicates a Resource Crunch in the system, but it can also occur due to the DI Server not responding.

Troubleshooting SAP Business One DI Server

Identifying Core issues

DI Server restart might not always occur because of issues in the tool. Sometimes, it may occur when the DI Server is utilized extensively, and it needs to generate a large number of errors. If the tool that is connecting to the DI Server is generating huge amounts of errors, you might need to fix the errors to overcome this problem. To identify the issue, we need to enable extended logs. Here are the steps to enable extended logs.

SAP-Business-One-DI-Server-Settings

  • Open SAP Business One Service Manager tool.
  • Choose DI Server Service.
  • Open Settings.
  • Check the Extended logs.
  • Save Changes and restart the DI Server service.

If you want to know more on how to investigate SAP Business One DI server issues, click here.

Increasing connection timeout

DI Server connection timeout can also be a cause of DI Server not responding issue. When the connection times out often, that means the data you are trying to fetch could not execute properly within the time interval specified. This might cause timeout issues and if the same query is called in a loop, it can generate huge numbers of errors which can cause the failure of the DI Server.

To overcome this scenario, we recommend increasing the Connection Timeout settings by following the steps below.

increasing-connection-timeout-for-sap-business-one-di-server

  • Open the DI Server Config file by using this Path – C:\Program Files\SAP\SAP Business One ServerTools\DI_Server
  • Edit DataConnectionTimeout property.
  • Change the value from 15 minutes to 40 minutes.
  • Save changes and restart the DI Server.

Changing the connection timeout to 40 minutes will reduce the possibility of timeout errors because 40 minutes is sufficient time for any query execution.

Troubleshooting DI Server: Changing Process Architecture

DI Server process architecture can also be a cause of the DI Server not responding issue. Depending on the amount of data load and parallel execution of queries, the process can also take a huge amount of memory to incorporate manipulations. It is always recommended to load as little data as possible through the DI Server, but if it is not possible, you might end up using process memory.

In the case of 32-bit process, there is a hard limit of 2 GB memory space that can be allocated only in a Windows system. Hence if you notice the DI Server module memory going beyond 1.5 GB, there is a high probability that it might crash soon due to reaching the limit.

 

You can install the DI Server 64-bit module to overcome the restriction of 2 GB since the 64-bit module has a 2 TB limit which is large enough that it cannot be reached in any system.

Manually restart the SAP Business One DI Server

Restarting the DI Server is not just restarting the service. There are multiple steps involved in restarting the service, as explained below.

  • Open the DI Server Console and stop the DI Server from the management console.
  • Go to C:\Windows\Temp.
  • Delete the SM_OBS_DLL and SM_OBS_64_DLL folders.
  • Start the DI Server again.

The SM_OBS_DLL folders are temporarily created, and when the DI Server cannot access these folders or try to reuse the folder, it stops responding. Deleting these folders will help the DI Server to recreate it automatically, thus enabling it to freely access the folders.

How to automate restart for SAP Business One DI Server

It is not always practical or efficient for businesses to restart the service manually. That is why it is recommended to use an automated approach to restart the service. Here are the methods to automate the process of restarting the service.

Through APPSeCONNECT

APPSeCONNECT provides you with a rule which you can use to restart the service in the customer’s environment. The tool will keep track of all these errors coming to the system and restart the DI Server module automatically. To enable the rule, follow the steps below:

  • Open Portal (https://portal.appseconnect.com)
  • Go to the Deploy section.
  • Select the Environment.
  • Choose Rule.
  • Deploy “SAPB1DISERVERReStartRule”.
  • The rule will keep track of all the scenarios and restart the DI Server automatically.

But to make this work, the APPSeCONNECT local service should have permission to restart the DI Server module. If it does not have appropriate permissions, the DI Server restart might fail.

Through batch files

Sometimes, the SAP Business One DI Server restart rule may also fail to fix the issue. In such cases, you can try using the batch file, which could be scheduled using the Task scheduler to restart the DI Server service after deleting the data.

sap-b1-di-server-batch-files

You can place this batch file inside a folder in Program Files. It’s recommended to choose Program files to ensure that you do not delete the file accidentally.

batch-files-in-program-files

To enable auto restart, open Task Scheduler and add a recurrence rule pointing to the batch file. It is generally recommended to restart the DI Server module once in 12 hours, but it also depends on the data load.

Conclusion

SAP Business One DI Server is having multiple problems and has already been replaced by the Service Layer, which is easily available and highly scalable. That is why we always recommend using the Service Layer instead of the DI Server. But if you are already using DI Server and you want to integrate through DI Server only, you can use the troubleshooting steps explained above to fix the ongoing problems with integration.

APPSeCONNECT supports SAP Business One integration with other applications using both the DI Server as well as Service Layer. Service Layer does not require the integration tool to be installed in the local network, and is the way to go for new installations, but when there is no way to choose or switch between these two technologies and you have to use the DI Server, we hope that following the troubleshooting steps will help you fix the issues associated with the SAP Business One DI server.

Integrate-Business-Apps-through-APPSeCONNECT

Search

Search

Free Trial / Demo

Try the APPSeCONNECT Integration Platform for 30 Days or request a free demo.
APPSeCONNECT-Horizontal Logo_SVG
appseconnect-New-Logo_2022.png

Start Your Automation Journey With Pre-Built Connectors.

Get a Demo. Try it Free.

g2 summer badges for popup