"UpdateRepository: database table is locked" error on git push #6319

Closed
opened 2025-11-02 06:52:28 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @sbourdeauducq on GitHub (Nov 16, 2020).

  • Gitea version (or commit ref): 1.12.5
  • Git version: 2.28.0
  • Operating system: NixOS 20.09.1758.3090c650411
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No

Description

When pushing to a repository, this error happened:

Enumerating objects: 22, done.
Counting objects: 100% (22/22), done.
Delta compression using up to 16 threads
Compressing objects: 100% (14/14), done.
Writing objects: 100% (14/14), 1.20 KiB | 1.20 MiB/s, done.
Total 14 (delta 12), reused 0 (delta 0), pack-reused 0
remote: Gitea: Internal Server Error
remote: Failed to Update: m-labs/artiq-zynq Error: CommitRepoAction: UpdateRepository: database table is locked
Gitea: Internal error
UpdatePublicKeyInRepo: Failed to update public key: database table is locked
To git.m-labs.hk:M-Labs/artiq-zynq.git
   32048ea..07b425a  master -> master
error: failed to push some refs to 'git.m-labs.hk:M-Labs/artiq-zynq.git'

The git repository otherwise appears to be fine and the push successful, except that some parts of the web interface like the commit list on the Gitea homepage failed to be updated.

This only occurred once during more than a year of using Gitea, and I cannot reproduce it, so I am not sure how debuggable this is at this point. I just wanted to open an issue so that more information can be added later, if I or others experience the same problem. Thanks for developing this nice application.

Originally created by @sbourdeauducq on GitHub (Nov 16, 2020). - Gitea version (or commit ref): 1.12.5 - Git version: 2.28.0 - Operating system: NixOS 20.09.1758.3090c650411 - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [X] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [X] No ## Description When pushing to a repository, this error happened: ``` Enumerating objects: 22, done. Counting objects: 100% (22/22), done. Delta compression using up to 16 threads Compressing objects: 100% (14/14), done. Writing objects: 100% (14/14), 1.20 KiB | 1.20 MiB/s, done. Total 14 (delta 12), reused 0 (delta 0), pack-reused 0 remote: Gitea: Internal Server Error remote: Failed to Update: m-labs/artiq-zynq Error: CommitRepoAction: UpdateRepository: database table is locked Gitea: Internal error UpdatePublicKeyInRepo: Failed to update public key: database table is locked To git.m-labs.hk:M-Labs/artiq-zynq.git 32048ea..07b425a master -> master error: failed to push some refs to 'git.m-labs.hk:M-Labs/artiq-zynq.git' ``` The git repository otherwise appears to be fine and the push successful, except that some parts of the web interface like the commit list on the Gitea homepage failed to be updated. This only occurred once during more than a year of using Gitea, and I cannot reproduce it, so I am not sure how debuggable this is at this point. I just wanted to open an issue so that more information can be added later, if I or others experience the same problem. Thanks for developing this nice application.
GiteaMirror added the type/bug label 2025-11-02 06:52:29 -06:00
Author
Owner

@qubist-pixel-ux commented on GitHub (Nov 23, 2020):

I experienced it too and now new commits are not shown in web interface. How to fix it ?

@qubist-pixel-ux commented on GitHub (Nov 23, 2020): I experienced it too and now new commits are not shown in web interface. How to fix it ?
Author
Owner

@6543 commented on GitHub (Nov 23, 2020):

looks like internal hook's cause a concurrency issue :/

the best workaround is to avoid sqlite3 as dbms

@6543 commented on GitHub (Nov 23, 2020): looks like internal hook's cause a concurrency issue :/ the best workaround is to avoid sqlite3 as dbms
Author
Owner

@qubist-pixel-ux commented on GitHub (Nov 24, 2020):

looks like internal hook's cause a concurrency issue :/

the best workaround is to avoid sqlite3 as dbms

I restarted gitea then pushed the repository. I can see all commits on gitea.

@qubist-pixel-ux commented on GitHub (Nov 24, 2020): > looks like internal hook's cause a concurrency issue :/ > > the best workaround is to avoid sqlite3 as dbms I restarted gitea then pushed the repository. I can see all commits on gitea.
Author
Owner

@sbourdeauducq commented on GitHub (Jan 11, 2021):

Likely duplicate of #14274

@sbourdeauducq commented on GitHub (Jan 11, 2021): Likely duplicate of #14274
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6319