-
Notifications
You must be signed in to change notification settings - Fork 174
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
Causes too many database connections via behat. #436
Comments
This also happens on 3.5.8. |
The issue seems to be raised from PDO itself, since Maybe you have some connection limitation in your DB? |
The connection issue will come from Postgres/Timescale. However, it is only caused when I installed the sentry bundle. Literally, the only change made was enabling the sentry bundle and the error arrived and when I removed it the error left. It seems logical that somehow the sentry bundle is interacting with Doctrine/Dbal/PDO in a way that causes it to lose a connection and regenerate a new one. |
That's not the only possible interaction; adding a new bundle could heavily shape how the DI container is dumped, hence creating the possibility for a trigger (but not a direct cause) of this issue. Citing a fast search: https://www.enterprisedb.com/blog/postgresql-pgpool-connection-pool-database-load
So, you're connecting too many times. Are you sure that your container is not over-instantiating its client multiple times? Or not sharing the instances? |
No that is the only interaction. Well, I did have to raise the PHP memory limit because of the memory usage caused by this bundle. Oh, and I had to manually add a dependency this bundle has. Overall, I tried to use this bundle and encountered 3 separate issues. The bug report is legit. I understand why you firmly believe this bundle is not the cause because it's completely nuts but sadly it is. And removing the bundle made the error go away. |
I'm saying that the bundle is not the root cause, but I agree that it's triggering the issue. I'm convinced that it's not the root cause since our code has no other way to interact with a database connection, so it's something a lot more complex that "your bundle has a bug". You can understand my scepticism since this is a very strange bug report, and this bundle is widely used, with no reports of such memory bloats up until now. Some parts of this comment were redacted as off-topic. |
This comment has been minimized.
This comment has been minimized.
I'm pretty sure your issue is the same as #379, which is not a fault of this bundle but rather an unfortunate consequence of having installed the Some parts of this comment were redacted as off-topic. |
I'll add my doctrine.yaml to help you guys. doctrine:
dbal:
default_connection: default
connections:
default:
url: '%env(resolve:DATABASE_URL)%'
timescale:
url: '%env(resolve:TIMESCALE_URL)%'
# IMPORTANT: You MUST configure your server version,
# either here or in the DATABASE_URL env var (see .env file)
#server_version: '13'
orm:
connection: default
auto_generate_proxy_classes: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
auto_mapping: true
resolve_target_entities:
HumblyArrogant\Underpin\User\Entity\UserInterface: App\Entity\User
HumblyArrogant\Underpin\User\Entity\TeamInterface: App\Entity\Team
mappings:
App:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
Underpin_User:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/vendor/humblyarrogant/underpin-bundle/src/User/Entity'
prefix: 'HumblyArrogant\Underpin\User\Entity'
alias: Underpin_User
Underpin_BackOffice:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/vendor/humblyarrogant/underpin-bundle/src/BackOffice/Entity'
prefix: 'HumblyArrogant\Underpin\BackOffice\Entity'
alias: Underpin_BackOffice The customer entities from the bundles only use MySQL so won't use the pgsql driver which is failing. Docker images used are Some parts of this comment were redacted as off-topic. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Greetings, friends, paid employee here. 👋 I'm on the Open Source team, which means I have no idea about the PHP details, but I'm happy to help route this to the right place. @iaicam Sorry for the frustration, you're right that you're in an officially supported Sentry repo, and three days is a long time to go without a proper response. We're grateful to @Jean85 @ste93cry and our other contributors, but ultimately yes it's Sentry's responsibility to stay on top of this repo. Sorry for not doing better with that, we are actively working to improve our open-source triage processes to keep up with our growth as a company and will continue striving to do better. I'm checking with some folks internally to make sure this is routed to the right team, please stand by ... |
This comment has been minimized.
This comment has been minimized.
@Jean85 gracefully donates a lot of his time into contributing to this library and I find the tone of the conversation here to be unnecessarily confrontational towards him. His comments on the nature of the issue I believe are entirely correct and I'm not sure there is anything actionable here. I'm inclined to close this issue and direct you towards the support in the app. There the issue will be triaged by the support team and escalated accordingly. |
I'm closing this because there are no enough information to reproduce this issue, and because I strongly believe it doesn't really depends on us. Should you have more information or should you be able to exactly pinpoint the issue feel free to reopen it back |
Environment
How do you use Sentry?
Sentry SaaS
Which SDK and version?
3.10 SDK
bundle 4.0.1
Steps to Reproduce
composer require sentry/sentry-symfony
Expected Result
Behat passes normally
Actual Result
Behat fails half way through with every test resulting in the same error
Note
It may be useful to know I have two dbal connections one for MySQL and one for TimescaleDB which uses the postgres driver and it's the timescaledb that is failing.
The text was updated successfully, but these errors were encountered: