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 sqlite MaxOpenConns to 1 for fixing database locking #4848

Closed
wants to merge 4 commits into from

Conversation

lunny
Copy link
Member

@lunny lunny commented Sep 2, 2018

@lunny lunny added the type/bug label Sep 2, 2018
@techknowlogick
Copy link
Member

This might not work because even if max connections is set to 1, multiple processes will still try to connect to DB (for example gitea serv via SSH) and they will all need one connection per process.

@bkcsoft bkcsoft added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 3, 2018
@sapk
Copy link
Member

sapk commented Sep 5, 2018

The solution could be to use the gitea api in gitea serv in place of accessing the database directly ?

@lunny
Copy link
Member Author

lunny commented Sep 5, 2018

@techknowlogick @sapk that's why we have /internal/ routes but I haven't moved all the requests.

@techknowlogick
Copy link
Member

@lunny that makes sense.

@sapk
Copy link
Member

sapk commented Sep 6, 2018

I could try to migrate serv to /internal and not use the models/database access.

@jonasfranz
Copy link
Member

jonasfranz commented Sep 7, 2018

I've tried this a time ago and it resulted in random errors like the server hanging up.

@lafriks
Copy link
Member

lafriks commented Sep 9, 2018

I think this should be closed in favor of #4886

@jonasfranz jonasfranz added this to the 1.x.x milestone Sep 18, 2018
@lunny lunny removed this from the 1.x.x milestone Oct 23, 2018
@stale
Copy link

stale bot commented Jan 5, 2019

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions.

@stale stale bot added the issue/stale label Jan 5, 2019
@techknowlogick
Copy link
Member

Closing as SQLite locking has mostly been resolved in other PRs

@lunny lunny deleted the lunny/fix_sqlite branch January 5, 2019 07:33
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/stale lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants