Skip to content

Stale callbacks in DatabaseTransactionsManager leaky into warm invocations when using Vapor #60528

@Eskeee

Description

@Eskeee

Laravel Version

12.61.0

PHP Version

8.4.22

Database Driver & Version

Postgres 18

Description

When running a worker running on AWS Lambda using Vapor, unhandled manual transactions appears to leak callbacks to warm invocations.

Initially encountered when experiencing jobs were dispatched to SQS even though after_commit is set.

I'd suspect it is due to a chained error consistency of a missing handling in disconnect. When Vapor terminates the invocations, it correctly invokes disconnect, however since it statically binds the app, it reuses the db instance.

Steps To Reproduce

Direct commit with test
Repository

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions