0

I have Symfony Messenger on Symfony 4.4.

The handler works with a Microsoft SQL Server 2019 (RTM-CU2) (KB4536075) - 15.0.4013.40 (X64). The connection to this db is done with a php custom library that just wraps PDO using FreeTDS 7.1. driver.

Sometimes the beginTransaction() throws a PDOException with the message There is already an active transaction.

I know that this means that somewhere in my codebase I am opening another transaction. But I am confident that this is not happening.

My guess is that the problem is somehow related to how Symfony Messenger works or to FreeTDS driver.

My question is: how to debug the PDOException There is already an active transaction?

  1. is it possible to get the contents of the already active transaction?
  2. I know about the PDO::inTransaction, but it only says if there already is an active transaction, no debug info here. Maybe PDO has other tools useful for debugging this issue?
nulll
  • 1,465
  • 1
  • 17
  • 28

0 Answers0