mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
New transaction is not allowed because there are other threads running in the session #6088
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @martinpfeiferdev on GitHub (Oct 29, 2018).
Hello, I'm trying to run a procedure, and then an update to a table, however the following error occurs: "New transaction is not allowed because there are other threads running in the session", follow the code below:
`
`
Any suggestions and / or solutions?
@Ocramius commented on GitHub (Oct 30, 2018):
What's the RDBMS? Nested transactions are quite normal in ORM context.
@martinpfeiferdev commented on GitHub (Oct 30, 2018):
@Ocramius RDBMS is SQL server 2012 and framework Symfony 3.4.
@Ocramius commented on GitHub (Oct 30, 2018):
Googled a bit, and this may be because the same PHP process has a second
open DB connection. Not really a DBAL or ORM issue: seems more like one of
the usual "SQL server being special" issues...
On Tue, 30 Oct 2018, 13:49 Martin Pfeifer, notifications@github.com wrote:
@martinpfeiferdev commented on GitHub (Oct 31, 2018):
@Ocramius
I agree with you, but do you have any solutions and / or suggestions for this case?
@Ocramius commented on GitHub (Oct 31, 2018):
Look for the second connection: this is not a bug in this tooling.
On Wed, 31 Oct 2018, 01:18 Martin Pfeifer <notifications@github.com wrote:
@martinpfeiferdev commented on GitHub (Nov 3, 2018):
@Ocramius
I solved it as follows, follow the code below:
`
public function update(TestEntity $testEntity) {
$sql = "EXEC TEST_PROC 1, 1";
}
`