Sysprocesses table - will it help me debug connection pooling issues?

风格不统一 提交于 2020-01-16 09:48:13

问题


I've got a windows service that regulary (every 10 sec) does a lot of db activity. I've verified that all my connections are closed (using using). After some time (days or hours) I get this error:

Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occured because all pooled connections were in use and max pool size was reached.

I found that I should check the sysprocesses table, and found that it is creating lots of new entries when my code is run (and I'm really sure I'm closing the connection)

Question is: In my case, where it is the same user doing the same queries all over, should there be a new entry for almost every tick in the service? Other services does not have this behaviour.

Or is maybe looking in the sysprocesses table not giving me any useful info?

Larsi


回答1:


sysprocesses is deprecated so if you're on 2005+ use sys.dm_exec_requests, sys.dm_exec_connections and sys.dm_exec_session.

that'll give you better info about your connections.



来源:https://stackoverflow.com/questions/7388006/sysprocesses-table-will-it-help-me-debug-connection-pooling-issues

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!