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

Add options to control the database connections (open,idle,timeout) #4212

Merged

Conversation

6543
Copy link
Member

@6543 6543 commented Oct 9, 2024

this allow more fine control and make sure woodpecker do not crash in high use scenarios where the engine try to create more connection as the database do allow ... (mariadb=100)

@6543 6543 added server enhancement improve existing features labels Oct 9, 2024
@6543 6543 requested a review from pat-s October 9, 2024 10:50
@woodpecker-bot
Copy link
Contributor

woodpecker-bot commented Oct 9, 2024

Deployment of preview was torn down

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

Attention: Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Project coverage is 26.50%. Comparing base (b0f52b9) to head (63f5552).
Report is 21 commits behind head on main.

Files with missing lines Patch % Lines
cmd/server/setup.go 0.00% 7 Missing ⚠️
server/store/datastore/engine.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4212      +/-   ##
==========================================
- Coverage   26.52%   26.50%   -0.02%     
==========================================
  Files         377      378       +1     
  Lines       27448    27506      +58     
==========================================
+ Hits         7281     7291      +10     
- Misses      19503    19549      +46     
- Partials      664      666       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@qwerty287
Copy link
Contributor

The defaults are the default values of xorm?

@6543
Copy link
Member Author

6543 commented Oct 9, 2024

the defaults i took form gitea (beside max con) -> this is currently the issue and reason i want this option (codeberg server freequently fails on that one ...)

cmd/server/flags.go Outdated Show resolved Hide resolved
@qwerty287
Copy link
Contributor

Can you use WOODPECKER_DATABASE_ as prefix, just like WOODPECKER_DATABASE_DATASOURCE? And add the old xorm var to the migration notes

@6543 6543 requested a review from qwerty287 November 5, 2024 02:48
@6543 6543 enabled auto-merge (squash) November 5, 2024 13:51
@6543 6543 merged commit 6e38a95 into woodpecker-ci:main Nov 5, 2024
7 checks passed
@woodpecker-bot woodpecker-bot mentioned this pull request Nov 5, 2024
1 task
@qwerty287 qwerty287 changed the title Add options to controll the database connections (open,idle,timeout) Add options to control the database connections (open,idle,timeout) Nov 5, 2024
@woodpecker-bot woodpecker-bot mentioned this pull request Dec 14, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improve existing features server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants