Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Database Connection per Request #2599

Open
mitelg opened this issue Sep 20, 2023 · 2 comments
Open

Multiple Database Connection per Request #2599

mitelg opened this issue Sep 20, 2023 · 2 comments

Comments

@mitelg
Copy link
Contributor

mitelg commented Sep 20, 2023

At the moment, we build up multiple data connection to MySQL.
This lead to too many connections and moreover an overhead for building up the connections.

Instead of creating a connection with

We should just use only one of these.

@mitelg
Copy link
Contributor Author

mitelg commented Sep 20, 2023

the first one is in the DI container as "db_connection" and is a PDO connection. the second is the "dbal_connection" and is a DBAL connection. so those two could not be unified, as this would result in a break. because the services behave not the same and have different methods.

the connection in the auth plugin is also a PDO connection, which may be used with the one, created in the kernel. but I don't know if this was done on purpose because of session locking?

possible solution: using the PDO connection from the kernel, to create the DBAL connection

@kayaArvatis
Copy link
Contributor

@mitelg I think the current implementation was due session locking i remember we had some problems with it caused by a plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants