Do Not Use Commerce Server OLEDB Queries in Site Code (321040)



The information in this article applies to:

  • Microsoft Commerce Server 2000

This article was previously published under Q321040

SYMPTOMS

When you run queries against the Commerce Server OLEDB provider, the queries may enter a deadlock condition. This symptom occurs when the number of simultaneous query requests is greater than the connection pool size in the DSDB3 component (the default size is 10). This symptom occurs more frequently in query operations against profiles that are aggregated across multiple data-stores.

CAUSE

Each aggregated query operation requires two connections from the connection pool that is implemented in the DSDB3 component. Because of this, the Commerce Server OLEDB provider query operation code path may enter a deadlock condition. One connection is used to retrieve the join key from the data store. The second connection is used to complete the appropriate operation (select/update/delete). These two sub-operations do not acquire the connections in an atomic fashion, and do not release the connections for the whole duration of the operation. If there are multiple threads running queries, they can become interleaved on the two sub-operations, and enter a deadlock when the command pool is used up.

RESOLUTION

Do not use the Commerce Server OLEDB provider heavily to perform query operations against profiles in a runtime environment. The implication is that it not be used in an ASP context where there might be multiple simultaneous users.

The connection pool size can be tuned using an environment variable. The variable name is ConnPoolSize. Define this variable on the computer that is running the Commerce Server OLEDB provider. You can help to mitigate the problem by increasing the pool size.

Modification Type:MajorLast Reviewed:10/17/2002
Keywords:kbprb KB321040