Scheduled tasks fail with error with the following error message:
New transaction is not allowed because there are other threads running in the session.
2021-09-10 04:00:00,752 ERROR Scheduler.Core.Service.Impl.TaskRunner - Error System.Data.Entity.Core.EntityException: An error occurred while starting a transaction on the provider connection. See the inner exception for details. ---> System.Data.SqlClient.SqlException: New transaction is not allowed because there are other threads running in the session.
It is a known issue, and it has been fixed in hotfix 2021.2.1.
It will also be available in 2021.3 which is due for release in October 2021.
Please, open a support case to have the mentioned testfix.