"database table is locked" while creating an issue via API #1947

Closed
opened 2025-11-02 04:18:50 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @jonasfranz on GitHub (Jun 18, 2018).

  • Gitea version (or commit ref): 85414d8
  • Git version: (docker)
  • Operating system: (docker)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes
    • No
    • Not relevant

Description

When I try to create an issue via the API, it returns the error "database table is locked" when using SQLite. If this error gets returned the issue has been created but the status hasn't changed.

2018/06/18 09:04:29 [...api/v1/repo/issue.go:203 CreateIssue()] [E] ChangeStatus: database table is locked: label
2018/06/18 09:04:29 [...api/v1/repo/issue.go:203 CreateIssue()] [E] ChangeStatus: database table is locked: label
2018/06/18 09:04:30 [...api/v1/repo/issue.go:203 CreateIssue()] [E] ChangeStatus: database table is locked: label
2018/06/18 09:04:31 [...api/v1/repo/issue.go:203 CreateIssue()] [E] ChangeStatus: database table is locked: label
2018/06/18 09:04:36 [...api/v1/repo/issue.go:203 CreateIssue()] [E] ChangeStatus: database table is locked: label
2018/06/18 09:04:39 [...api/v1/repo/issue.go:203 CreateIssue()] [E] ChangeStatus: database table is locked: comment
2018/06/18 09:04:40 [...api/v1/repo/issue.go:203 CreateIssue()] [E] ChangeStatus: database table is locked: label
2018/06/18 09:04:42 [...api/v1/repo/issue.go:203 CreateIssue()] [E] ChangeStatus: database table is locked: label
2018/06/18 09:04:43 [...api/v1/repo/issue.go:203 CreateIssue()] [E] ChangeStatus: database table is locked: label
2018/06/18 09:04:44 [...api/v1/repo/issue.go:203 CreateIssue()] [E] ChangeStatus: database table is locked: label
Originally created by @jonasfranz on GitHub (Jun 18, 2018). - Gitea version (or commit ref): 85414d8 - Git version: (docker) - Operating system: (docker) - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes - [ ] No - [ ] Not relevant ## Description When I try to create an issue via the API, it returns the error "database table is locked" when using SQLite. If this error gets returned the issue has been created but the status hasn't changed. ``` 2018/06/18 09:04:29 [...api/v1/repo/issue.go:203 CreateIssue()] [E] ChangeStatus: database table is locked: label 2018/06/18 09:04:29 [...api/v1/repo/issue.go:203 CreateIssue()] [E] ChangeStatus: database table is locked: label 2018/06/18 09:04:30 [...api/v1/repo/issue.go:203 CreateIssue()] [E] ChangeStatus: database table is locked: label 2018/06/18 09:04:31 [...api/v1/repo/issue.go:203 CreateIssue()] [E] ChangeStatus: database table is locked: label 2018/06/18 09:04:36 [...api/v1/repo/issue.go:203 CreateIssue()] [E] ChangeStatus: database table is locked: label 2018/06/18 09:04:39 [...api/v1/repo/issue.go:203 CreateIssue()] [E] ChangeStatus: database table is locked: comment 2018/06/18 09:04:40 [...api/v1/repo/issue.go:203 CreateIssue()] [E] ChangeStatus: database table is locked: label 2018/06/18 09:04:42 [...api/v1/repo/issue.go:203 CreateIssue()] [E] ChangeStatus: database table is locked: label 2018/06/18 09:04:43 [...api/v1/repo/issue.go:203 CreateIssue()] [E] ChangeStatus: database table is locked: label 2018/06/18 09:04:44 [...api/v1/repo/issue.go:203 CreateIssue()] [E] ChangeStatus: database table is locked: label ```
Author
Owner

@lafriks commented on GitHub (Jun 18, 2018):

Isn't that duplicate for #2040 ?

@lafriks commented on GitHub (Jun 18, 2018): Isn't that duplicate for #2040 ?
Author
Owner

@jonasfranz commented on GitHub (Jun 18, 2018):

@lafriks You're right. But I found a solution for this problem by enabling WAL mode.

@jonasfranz commented on GitHub (Jun 18, 2018): @lafriks You're right. But I found a solution for this problem by enabling WAL mode.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1947