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

BrAPI Server DB connections exhausted on biapi startup caching #3

Open
sb2597 opened this issue Jan 23, 2025 · 0 comments
Open

BrAPI Server DB connections exhausted on biapi startup caching #3

sb2597 opened this issue Jan 23, 2025 · 0 comments

Comments

@sb2597
Copy link

sb2597 commented Jan 23, 2025

Full Details can be found at: https://breedinginsight.atlassian.net/browse/BI-2450

When attempting to start biapi after clearing all keys from redis cache, brapi server gets overwhelmed due to large volume of requests coming in to cache all data. Database connections are exhausted and data requests fail with ApiExceptions 500 errors from brapi server.

This is applicable to systems that have a lot of data stored in the brapi server, in this case, rel-test but would likely also apply to other systems including production.

Per Matthew, we could increase the brapi-server's connection pool size by configuring it in the application.properties like this:

# Hikari Pool Configuration
spring.datasource.hikari.maximum-pool-size=50
spring.datasource.hikari.connection-timeout=30000

but from what I've read, increasing the connection pool size isn't a great solution, it would be better to troubleshoot and eliminate whatever transactions are taking 30 seconds plus to run.

Acceptance Criteria

GIVEN a deployment with data volume equivalent to to current rel-test brapi server
WHEN the redis cache keys are cleared and bi-api is restarted
THEN the redis cache should be populated without error on bi-api startup as verified by biapi and brapi server logs

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

1 participant