Quick and dirty problem report.  I do not yet have a simple reproduction
program.  However, we are convinced there is a problem in the current Win32
ODBC driver.


Background
===============
We have two Windows 2000 SP 4 / ASP.NET 1.1 application servers.  Both dual
CPU, but running ASP.NET only one CPU (Web Garden turned off).

The two servers have different configuration:
1) One application server uses a second machine for SAPDB, using a dedicated
network adapter to do ODBC over TCP/IP.
2) The application other server runs SAPDB on the same machine, using
localhost calls for ODBC.

Both machines running 7.4.03.27 and the included 7.4.03.27 ODBC driver.


PROBLEM
===========
Once in a while, ASP.NET will just "stick" and "stall" under high
concurrency.  Regardless of the database location (same machine or over
network TCP/IP).  The ODBC calls from ASP.NET will just call forever, no
exception or timeout ever happens.

A long-running SQL statement will often cause the ASP.NET process to get
stuck. Stopping inetinfo and restarting it (w3svc) will get the ASP.NET
pages to load - but all ODBC calls to SAPDB will hang.  You have to kill
inetinfo,dllhost,aspnet_wp (all three) to get the SAPDB odbc stall to free
up.  I think it is actually dllhost that is sticking to the ODBC driver.

Console applications we have running on the _same machine_ work fine, even
while ASP.NET SAPDB ODBC calls are stalled.  So it isn't the SAPDB kernel
nor is it the ODBC driver interface.  It is just the specific instance of
the SAPDB ODBC driver that sticks.  I have seen the kernel idle while
ASP.NET odbc calls just queue up.

ODBC Driver Connection Pooling on or off makes no difference.


Speculation
=============
ASP.NET is doing multi-threaded calls to the ODBC driver.  Our console
applications are single-threaded and never have problems.


Work Around
================
We finally found a work around... which was to put a wrapper method around
all our SAPDB ODBC calls.  We basically serialize all the ODBC calls and the
driver never hangs!  In other words, we make sure that no more than one
SAPDB ODBC call is in progress from ASP.NET 1.1 at the same time (eliminate
concurrent calls).  We do this by using a static counter that we
increment/decrement around each SAPDB ODBC call.  If there are other calls
in progress, we do a thread.sleep loop until the previous SQL statement
completes.

The problem entirely disappears.  This slows down our ASP.NET application,
but our ASP.NET application is no longer hanging / stalling under high
concurrency.


More Information
=================
Obviously we would like to produce a simple console or ASP.NET program to
show this behavior in the SAPDB ODBC driver.  We are going to try and
produce one.  However, it is not easy situation to reproduce.  If any other
SAPDB users can contribute to tracking this down, please chime in.

  Stephen Gutknecht


_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to