Error when creating pull request or sending test email #567

Closed
opened 2025-11-02 03:28:22 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @plessbd on GitHub (Mar 22, 2017).

  • Gitea version (or commit ref): master
  • Git version:
  • Operating system: centos
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log :
    gitea.log
    2017/03/22 15:37:42 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[22]: database table is locked: repository
    2017/03/22 15:37:42 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[27]: database table is locked: repository
    2017/03/22 15:37:42 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[28]: database table is locked: repository
    2017/03/22 15:37:42 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[33]: database table is locked: repository
    2017/03/22 15:37:42 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[41]: database table is locked: repository
    2017/03/22 15:37:42 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[44]: database table is locked: repository

xorm.log
2017/03/22 15:37:42 [W] Table user Column allow_create_organization db default is , struct default is 1
2017/03/22 15:37:42 [W] Table user Column diff_view_style db default is '''', struct default is ''
2017/03/22 15:37:42 [W] Table repository has column enable_wiki but struct has not related field
2017/03/22 15:37:42 [W] Table repository has column enable_external_wiki but struct has not related field
2017/03/22 15:37:42 [W] Table repository has column external_wiki_url but struct has not related field
2017/03/22 15:37:42 [W] Table repository has column enable_issues but struct has not related field
2017/03/22 15:37:42 [W] Table repository has column enable_external_tracker but struct has not related field
2017/03/22 15:37:42 [W] Table repository has column external_tracker_format but struct has not related field
2017/03/22 15:37:42 [W] Table repository has column external_tracker_style but struct has not related field
2017/03/22 15:37:42 [W] Table repository has column enable_pulls but struct has not related field
2017/03/22 15:37:42 [W] Table repository has column external_tracker_url but struct has not related field
2017/03/22 15:37:42 [W] Table issue_user has column repo_id but struct has not related field
2017/03/22 15:37:42 [W] Table issue_user has column milestone_id but struct has not related field
2017/03/22 15:37:42 [W] Table issue_user has column is_poster but struct has not related field
2017/03/22 15:37:42 [W] Table issue_user has column is_closed but struct has not related field

nginx.log
2017/03/22 15:37:42 [error] 10276#10276: *6981 upstream prematurely closed connection while reading response header from upstream, client: 128.205.40.197, server: domain.fqdn, request: "POST /git/ORG/REPO/compare/master...USER:BRANCH HTTP/1.1", upstream: "http://127.0.0.1:3000/ORG/REPO/compare/master...USER:BRANCH", host: "tas-tools-int-01.ccr.xdmod.org"

Description

When I create a pull request I end up getting a 503 from the nginx proxy I have in front of gitea

Not sure if something didnt work with my migration but the database errors seem wrong, and the pull request is still created and works

Originally created by @plessbd on GitHub (Mar 22, 2017). - Gitea version (or commit ref): master - Git version: - Operating system: centos - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [X] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log : gitea.log 2017/03/22 15:37:42 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[22]: database table is locked: repository 2017/03/22 15:37:42 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[27]: database table is locked: repository 2017/03/22 15:37:42 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[28]: database table is locked: repository 2017/03/22 15:37:42 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[33]: database table is locked: repository 2017/03/22 15:37:42 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[41]: database table is locked: repository 2017/03/22 15:37:42 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[44]: database table is locked: repository xorm.log 2017/03/22 15:37:42 [W] Table user Column allow_create_organization db default is , struct default is 1 2017/03/22 15:37:42 [W] Table user Column diff_view_style db default is '''', struct default is '' 2017/03/22 15:37:42 [W] Table repository has column enable_wiki but struct has not related field 2017/03/22 15:37:42 [W] Table repository has column enable_external_wiki but struct has not related field 2017/03/22 15:37:42 [W] Table repository has column external_wiki_url but struct has not related field 2017/03/22 15:37:42 [W] Table repository has column enable_issues but struct has not related field 2017/03/22 15:37:42 [W] Table repository has column enable_external_tracker but struct has not related field 2017/03/22 15:37:42 [W] Table repository has column external_tracker_format but struct has not related field 2017/03/22 15:37:42 [W] Table repository has column external_tracker_style but struct has not related field 2017/03/22 15:37:42 [W] Table repository has column enable_pulls but struct has not related field 2017/03/22 15:37:42 [W] Table repository has column external_tracker_url but struct has not related field 2017/03/22 15:37:42 [W] Table issue_user has column repo_id but struct has not related field 2017/03/22 15:37:42 [W] Table issue_user has column milestone_id but struct has not related field 2017/03/22 15:37:42 [W] Table issue_user has column is_poster but struct has not related field 2017/03/22 15:37:42 [W] Table issue_user has column is_closed but struct has not related field nginx.log 2017/03/22 15:37:42 [error] 10276#10276: *6981 upstream prematurely closed connection while reading response header from upstream, client: 128.205.40.197, server: domain.fqdn, request: "POST /git/ORG/REPO/compare/master...USER:BRANCH HTTP/1.1", upstream: "http://127.0.0.1:3000/ORG/REPO/compare/master...USER:BRANCH", host: "tas-tools-int-01.ccr.xdmod.org" ## Description When I create a pull request I end up getting a 503 from the nginx proxy I have in front of gitea Not sure if something didnt work with my migration but the database errors seem wrong, and the pull request is still created and works
GiteaMirror added the type/bug label 2025-11-02 03:28:22 -06:00
Author
Owner

@strk commented on GitHub (Mar 22, 2017):

@lunny sounds like another of those missing transactions ?

@strk commented on GitHub (Mar 22, 2017): @lunny sounds like another of those missing transactions ?
Author
Owner

@plessbd commented on GitHub (Mar 23, 2017):

So this has started to happen with sending a test email as well
A bit different in that if you do it once it fails, then the second time it works

==> gitea.log <==
2017/03/23 14:05:32 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[22]: database table is locked: repository
2017/03/23 14:05:32 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[27]: database table is locked: repository
2017/03/23 14:05:32 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[28]: database table is locked: repository
2017/03/23 14:05:32 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[33]: database table is locked: repository
2017/03/23 14:05:32 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[41]: database table is locked: repository
2017/03/23 14:05:32 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[44]: database table is locked: repository

==> xorm.log <==
2017/03/23 14:05:32 [W] Table user Column allow_create_organization db default is , struct default is 1
2017/03/23 14:05:32 [W] Table user Column diff_view_style db default is '''', struct default is ''
2017/03/23 14:05:32 [W] Table repository has column enable_wiki but struct has not related field
2017/03/23 14:05:32 [W] Table repository has column enable_external_wiki but struct has not related field
2017/03/23 14:05:32 [W] Table repository has column external_wiki_url but struct has not related field
2017/03/23 14:05:32 [W] Table repository has column enable_issues but struct has not related field
2017/03/23 14:05:32 [W] Table repository has column enable_external_tracker but struct has not related field
2017/03/23 14:05:32 [W] Table repository has column external_tracker_format but struct has not related field
2017/03/23 14:05:32 [W] Table repository has column external_tracker_style but struct has not related field
2017/03/23 14:05:32 [W] Table repository has column enable_pulls but struct has not related field
2017/03/23 14:05:32 [W] Table repository has column external_tracker_url but struct has not related field
2017/03/23 14:05:32 [W] Table issue_user has column repo_id but struct has not related field
2017/03/23 14:05:32 [W] Table issue_user has column milestone_id but struct has not related field
2017/03/23 14:05:32 [W] Table issue_user has column is_poster but struct has not related field
2017/03/23 14:05:32 [W] Table issue_user has column is_closed but struct has not related field

==> nginx.log <==
2017/03/23 14:05:32 [error] 10276#10276: *7245 upstream prematurely closed connection while reading response header from upstream, client: 128.205.40.197, server: DOMAIN, request: "POST /git/admin/config/test_mail HTTP/1.1", upstream: "http://127.0.0.1:3000/admin/config/test_mail", host: "DOMAIN"
@plessbd commented on GitHub (Mar 23, 2017): So this has started to happen with sending a test email as well A bit different in that if you do it once it fails, then the second time it works ``` ==> gitea.log <== 2017/03/23 14:05:32 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[22]: database table is locked: repository 2017/03/23 14:05:32 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[27]: database table is locked: repository 2017/03/23 14:05:32 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[28]: database table is locked: repository 2017/03/23 14:05:32 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[33]: database table is locked: repository 2017/03/23 14:05:32 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[41]: database table is locked: repository 2017/03/23 14:05:32 [...gitea/models/repo.go:2041 CheckRepoStats()] [E] Update repository count 'num_watches'[44]: database table is locked: repository ==> xorm.log <== 2017/03/23 14:05:32 [W] Table user Column allow_create_organization db default is , struct default is 1 2017/03/23 14:05:32 [W] Table user Column diff_view_style db default is '''', struct default is '' 2017/03/23 14:05:32 [W] Table repository has column enable_wiki but struct has not related field 2017/03/23 14:05:32 [W] Table repository has column enable_external_wiki but struct has not related field 2017/03/23 14:05:32 [W] Table repository has column external_wiki_url but struct has not related field 2017/03/23 14:05:32 [W] Table repository has column enable_issues but struct has not related field 2017/03/23 14:05:32 [W] Table repository has column enable_external_tracker but struct has not related field 2017/03/23 14:05:32 [W] Table repository has column external_tracker_format but struct has not related field 2017/03/23 14:05:32 [W] Table repository has column external_tracker_style but struct has not related field 2017/03/23 14:05:32 [W] Table repository has column enable_pulls but struct has not related field 2017/03/23 14:05:32 [W] Table repository has column external_tracker_url but struct has not related field 2017/03/23 14:05:32 [W] Table issue_user has column repo_id but struct has not related field 2017/03/23 14:05:32 [W] Table issue_user has column milestone_id but struct has not related field 2017/03/23 14:05:32 [W] Table issue_user has column is_poster but struct has not related field 2017/03/23 14:05:32 [W] Table issue_user has column is_closed but struct has not related field ==> nginx.log <== 2017/03/23 14:05:32 [error] 10276#10276: *7245 upstream prematurely closed connection while reading response header from upstream, client: 128.205.40.197, server: DOMAIN, request: "POST /git/admin/config/test_mail HTTP/1.1", upstream: "http://127.0.0.1:3000/admin/config/test_mail", host: "DOMAIN" ```
Author
Owner

@lunny commented on GitHub (Mar 24, 2017):

@strk this is not a transaction thing. It seems because there are two goroutines to operate sqlite database.

@lunny commented on GitHub (Mar 24, 2017): @strk this is not a transaction thing. It seems because there are two goroutines to operate sqlite database.
Author
Owner

@bkcsoft commented on GitHub (Jun 15, 2017):

Could you test if this fixes the issue? #1961 (applying the diff and building on v1.1.2 should be straight forward)

@bkcsoft commented on GitHub (Jun 15, 2017): Could you test if this fixes the issue? #1961 (applying the diff and building on v1.1.2 should be straight forward)
Author
Owner

@bkcsoft commented on GitHub (Jun 15, 2017):

Could you test if this fixes the issue? #1961

@bkcsoft commented on GitHub (Jun 15, 2017): Could you test if this fixes the issue? #1961
Author
Owner

@plessbd commented on GitHub (Jun 20, 2017):

@bkcsoft I will wait since @lunny said in #1434 that this might not be fixed.

I am also going to try to migrate to mysql instead as I now have a reason to. This will be interesting...

@plessbd commented on GitHub (Jun 20, 2017): @bkcsoft I will wait since @lunny said in #1434 that this might not be fixed. I am also going to try to migrate to mysql instead as I now have a reason to. This will be interesting...
Author
Owner

@lunny commented on GitHub (Jun 23, 2017):

continue via #2040

@lunny commented on GitHub (Jun 23, 2017): continue via #2040
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#567