AnsweredAssumed Answered

AF database has been disconnected

Question asked by Robatjazi on Nov 21, 2018
Latest reply on Nov 28, 2018 by David Hearn

Hey guys,


I have an issue with AF database. This is the scenario:

- There is one AF Server with multiple database.

- There is a WEB API which connect to AF database to read  and write to it.

- There is 5 services, 3 of them using the API and 2 of them connect to AF database

- We have 3 different users here, one is used for Web API, one is used for 3 service (which use API), the last user is used for 2 service that directly connect to AF database.


In one of the services we get following error time to time:
System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Database 'XXX' has been disconnected. This is caused by using an object from a database after calling PISystem.Disconnect.


The thing is that it does not happen all the time. this service is running every 1 minutes and every hour or so we get this error.

Based on stack trace, it happens when service trying to read attributes from AFElement.


Anyone has any suggestion?


Thank you!