My organization is receiving exceptions inside a web service that uses the following interop dlls: EPDM.Interop.epdm.dll and EPDM.Interop.EPDMResultCode.dll. The web service returns documents stored in the PDM vault to an in-house application used by our employees. Most of the time it returns documents fine but periodically the server's application event log records the following exception:
Application Event Log:
Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7a5f8
Faulting module name: EdmInterface.dll, version: 126.96.36.1995, time stamp: 0x548eb873
Exception code: 0xc0000005
Fault offset: 0x00077182
Faulting process id: 0x1a98
Faulting application start time: 0x01d3d26aa063326c
Faulting application path: C:\Windows\SysWOW64\inetsrv\w3wp.exe
Faulting module path: C:\Program Files (x86)\SOLIDWORKS Enterprise PDM\EdmInterface.dll
Report Id: 92e2c0ff-3e5e-11e8-be69-005056895e59
Additionally, we see thousands of the following entries inside the PDM Administration Log File:
========= LAST COMMAND ========
Select Username From Users Where UserID=45
Date: 2018-04-12 07:36:07.506
Code Description: Could not access the item in the database.
Error running query in SpDbOdbc
Msg=[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt
========= LAST COMMAND ======== ...etc.
There are thousands more errors of this exact kind happening. No other errors except this show up in the log file. I cannot correlate the exceptions inside PDM to the exceptions recorded in the application event log but I also cannot rule out that they are not related to one another.
Does anyone have any tips on what I can do to debug either of these errors? I have admin access to both the sql server and the windows server running PDM.
To make this more (less) fun, the web service appears to run fine. It does not appear to generate exceptions when it calls into the interops. The only telltale sign I have that something is amiss is the application that calls the web service times out.
I was able to narrow down the call that is generating the E_EDM_DATABASE_ACCESS error to GetComputedBOM (2014 SOLIDWORKS API Help - GetComputedBOM Method (IEdmFile7)).
We are calling it with the following arguments: edmFile.GetComputedBOM(2, 0, "@", 1).
I still do not have a lead on the application event error or if it is directly related to the EDM error.