We are running BC20 cu7 OnPrem.
We are having some issues with locks in our solution and we have discovered that many sessions are not "deleted" from SQL server even though it is several days since their connection were closed.
If we go into Database locks in BC sometimes a user is shown and sometimes there is no session ID on the database locks - so we have 2 options either restart the BC Service or do a Kill command directly on the SQL server.
On the SQL server we have tried to run the SP_Who2 command and can see that many sessions are "sleeping" and "awaiting command" - some of them are for example blocking a specific sales invoice so that no one can print that sales invoice until we have removed the session.
Anyone know why the sessions get to that state?
I can read in the MS documentation that the Client timeout configuration consists of
- SessionTimeout On the Webservice (in our case this is set to 20 mins)
- IdleClientTimeout on the BC service (In our case this is set to MaxValue)
So in this case the session should be closed after 20 minutes of inactivity. What about Job queues? If they run into an error - are they covered by these settings?
After the connection is lost there are a few parameters on the BC Service that are relevant.
- KeepAliveInterval (this is 20 mins in our case)
- ReconnectPeriod (this is 10 mins in our case)
So according to MS the session will be closed after 2 x KeepAliveInterval + ReconnectPeriod which is after 50 minutes in our case... one of the consequences of closing the sessions is that the session will be deleted from the Active Sessions table in BC - but that is not always happening. We can find sessions several days old.
Anyone have experienced the same? Or have some pointers as to where to look or what to try.
We have also heard that many locking problems have been solved in newer versions of BC? We are not ready to upgrade but that can shead a little light on our problems. :-)
Thank you very much.