Skip to Content
0
Former Member
Apr 16, 2009 at 12:29 PM

Intermittent API connection errors

118 Views

Hi all,

I hope some can help.

We have written a generic framework in CLR Stored Procedures (C# - MSSQL 2005) and using the DI-API to interface with SAP B1 2007A SP00 PL45. The CLR SPs contain all the logic required to connect and upload documents into SAP. We are connecting to SAP using one user ID with a professional license. Multiple instances of these CLRSPs can potentially be invoked from different places. For example an add-on to upload a journal file and a SQL Job to import a sales file at end-of-day.

The SAP database is running on MSSQL 64Bit 2005 Standard Edition on a 64bit, 8 core, 16gb RAM server. Please find a detailed server spec below;

[System Summary]

OS Name Microsoft(R) Windows(R) Server 2003 Standard x64 Edition

Version 5.2.3790 Service Pack 2 Build 3790

Other OS Description R2

OS Manufacturer Microsoft Corporation

System Manufacturer HP

System Model ProLiant BL460c G1

System Type x64-based PC

Processor EM64T Family 6 Model 23 Stepping 6 GenuineIntel ~2667 Mhz

Processor EM64T Family 6 Model 23 Stepping 6 GenuineIntel ~2667 Mhz

Processor EM64T Family 6 Model 23 Stepping 6 GenuineIntel ~2667 Mhz

Processor EM64T Family 6 Model 23 Stepping 6 GenuineIntel ~2667 Mhz

Processor EM64T Family 6 Model 23 Stepping 6 GenuineIntel ~2667 Mhz

Processor EM64T Family 6 Model 23 Stepping 6 GenuineIntel ~2667 Mhz

Processor EM64T Family 6 Model 23 Stepping 6 GenuineIntel ~2667 Mhz

Processor EM64T Family 6 Model 23 Stepping 6 GenuineIntel ~2667 Mhz

BIOS Version/Date HP I15, 24/01/2008

SMBIOS Version 2.4

Windows Directory C:\WINDOWS

System Directory C:\WINDOWS\system32

Boot Device \Device\HarddiskVolume1

Locale United States

Hardware Abstraction Layer Version = "5.2.3790.3959 (srv03_sp2_rtm.070216-1710)"

User Name Not Available

Time Zone W. Europe Daylight Time

Total Physical Memory 16,381.67 MB

Available Physical Memory 7.33 GB

Total Virtual Memory 17.40 GB

Available Virtual Memory 8.85 GB

Page File Space 2.00 GB

Page File C:\pagefile.sys

Since the DI-API doesn't run in a 64bit environment the CLR SPs were deployed on a 32bit version of SQL Server Express that is sitting alongside the SAP database. We are having a series of problems and cannot identify the cause, but believe they are having a cascading effect. The CLR SPs, intermittently, throw exceptions, just hang or even worse stop SQL server (Express / 32bit) altogether. Some of these exceptions are RPC_SERVERFAULTS, "failed to extract Observer.dll from CAB file" and other COM exceptions. After this happens a couple of times SAP refuses to allow other calling add-ons to connect, throwing out a message saying "Failed to connect to SBOCommon" (screenshot attached). The only way to resolve this is to restart SQL Server Express.

We have managed to resolve the RPC errors by adding a slight delay after the .Add() method when uploading a lot of documents as we suspected it could be a buffering problem in the DI-API. Other exceptions like 'Object reference not set to an instance of an object" are still left unresolved though and seem to be crashing the CLRSPs hence then not allowing other CLRSPs to connect due to the "Failed to connect to SBOCommon".

We are currently migrating the CLR SPs onto MS SQL 2005 Standard Edition on a separate 32bit machine to see whether the stability of the CLRSPs improves due to the limitations of SQL express. In the meantime it would be appreciated if anyone could provide some answers to the following questions;

1. What could possibly be causing the "Failed to coonnect to SBOCommon"? Could this be because we are using a normal user license for testing rather than a DI-server license?

2. Has anyone integrated with SAP by calling the DI-API via CLRSPs? Anything to watch out for?

3. Are there any memory leaks in the DI-API we should be watching out for?

Many thanks for reading 😉

Damian