Error 404 on pull request with large repository #4249

Closed
opened 2025-11-02 05:43:50 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @Frickeldave on GitHub (Nov 5, 2019).

  • Gitea version (or commit ref): 1.8.0 with go version 1.12.4
  • Git version: 2.20.1
  • Operating system: Alpine Linux in Docker
  • 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 gist:

Description

I created an empty repository in an organization. Then i forked that in my userspace and added two versions of intellij in it. All binary files are splitted in 10MB files with 7-Zip. The size of the repo is ~ 1,13GB. Now i tried to merge that into the original source repository. After ~10 seconds i get a 404 error. What can i do to locate the failure?
Regards and thanks in advance
Dave

Originally created by @Frickeldave on GitHub (Nov 5, 2019). - Gitea version (or commit ref): 1.8.0 with go version 1.12.4 - Git version: 2.20.1 - Operating system: Alpine Linux in Docker - Database (use `[x]`): - [ ] PostgreSQL - [X] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [ ] Not relevant - Log gist: ## Description I created an empty repository in an organization. Then i forked that in my userspace and added two versions of intellij in it. All binary files are splitted in 10MB files with 7-Zip. The size of the repo is ~ 1,13GB. Now i tried to merge that into the original source repository. After ~10 seconds i get a 404 error. What can i do to locate the failure? Regards and thanks in advance Dave
GiteaMirror added the type/question label 2025-11-02 05:43:50 -06:00
Author
Owner

@zeripath commented on GitHub (Nov 5, 2019):

We could do with some logs from the gitea server.

@zeripath commented on GitHub (Nov 5, 2019): We could do with some logs from the gitea server.
Author
Owner

@Frickeldave commented on GitHub (Nov 5, 2019):

In the gitea.log i found the following line:

2019/11/05 20:15:22 [...routers/repo/pull.go:943 CompareAndPullRequestPost()] [E] NewPullRequest: testPatch: git apply --check: exec(1406:testPatch (git apply --check): 2) failed: signal: killed(context deadline exceeded) stdout: stderr: -

@Frickeldave commented on GitHub (Nov 5, 2019): In the gitea.log i found the following line: 2019/11/05 20:15:22 [...routers/repo/pull.go:943 CompareAndPullRequestPost()] [E] NewPullRequest: testPatch: git apply --check: exec(1406:testPatch (git apply --check): 2) failed: signal: killed(context deadline exceeded) stdout: stderr: -
Author
Owner

@ashimokawa commented on GitHub (Nov 6, 2019):

This problem still exists, we have a much smaller repo on codeberg.org, the PR diff size is probably around 13MB, and git apply --check also timeouts, resulting in a 500 error.

We had a "friendly" user rage quitting codeberg over it and claiming it would work in gogs.

I forked the project where this happened here
https://codeberg.org/test/cloudflare-tor

and then here

https://codeberg.org/test2/cloudflare-tor

created a pull request from branch "httperror" to master

https://codeberg.org/test/cloudflare-tor/compare/master...test2:httperror

after clicking on the final create pull request we get the timeout.

I think there is not much to do about it except increasing the timeout for the git apply --check command.... :(

EDIT: I am not affiliated with that repo, otherwise then using it for testing.

@ashimokawa commented on GitHub (Nov 6, 2019): This problem still exists, we have a much smaller repo on codeberg.org, the PR diff size is probably around 13MB, and git apply --check also timeouts, resulting in a 500 error. We had a "friendly" user rage quitting codeberg over it and claiming it would work in gogs. I forked the project where this happened here https://codeberg.org/test/cloudflare-tor and then here https://codeberg.org/test2/cloudflare-tor created a pull request from branch "httperror" to master https://codeberg.org/test/cloudflare-tor/compare/master...test2:httperror after clicking on the final create pull request we get the timeout. I think there is not much to do about it except increasing the timeout for the git apply --check command.... :( EDIT: I am not affiliated with that repo, otherwise then using it for testing.
Author
Owner

@lunny commented on GitHub (Nov 6, 2019):

Have you tried to change the git timeout setting in your app.ini?

@lunny commented on GitHub (Nov 6, 2019): Have you tried to change the git timeout setting in your app.ini?
Author
Owner

@ashimokawa commented on GitHub (Nov 6, 2019):

@lunny
Thanks, that fixed the problem.
I thought the sample app.ini were the default, but when I filled in exactly these then it works.

DEFAULT = 360 MIGRATE = 600 MIRROR = 300 CLONE = 300 PULL = 300 GC = 60

Thanks @lunny !

@ashimokawa commented on GitHub (Nov 6, 2019): @lunny Thanks, that fixed the problem. I thought the sample app.ini were the default, but when I filled in exactly these then it works. ` DEFAULT = 360 MIGRATE = 600 MIRROR = 300 CLONE = 300 PULL = 300 GC = 60 ` Thanks @lunny !
Author
Owner

@Frickeldave commented on GitHub (Nov 6, 2019):

Hi,

i increased PULL and DEFAULT to 20000. When i create the pull request, i get a 404 after ~20 seconds. But when i wait ~2-5 minutes the pull requests appears and can be used for merging. So the issue itself is solved for me, but the ui will end in a 404. Should i close this issue or would you leave that for open for further analysis?

Regards Dave

@Frickeldave commented on GitHub (Nov 6, 2019): Hi, i increased PULL and DEFAULT to 20000. When i create the pull request, i get a 404 after ~20 seconds. But when i wait ~2-5 minutes the pull requests appears and can be used for merging. So the issue itself is solved for me, but the ui will end in a 404. Should i close this issue or would you leave that for open for further analysis? Regards Dave
Author
Owner

@ashimokawa commented on GitHub (Nov 6, 2019):

@Fickeldave

With newer gitea you won't get 404 when doing this, I guess, I only got 500 because of the timeout. And that was my fault, because I did not set timeouts properly.

You should update gitea to stable 1.9.x, 1.8.0 is no longer supported AFAIK.

@ashimokawa commented on GitHub (Nov 6, 2019): @Fickeldave With newer gitea you won't get 404 when doing this, I guess, I only got 500 because of the timeout. And that was my fault, because I did not set timeouts properly. You should update gitea to stable 1.9.x, 1.8.0 is no longer supported AFAIK.
Author
Owner

@Frickeldave commented on GitHub (Nov 6, 2019):

Ok fine thanks. Than we can close that.

@Frickeldave commented on GitHub (Nov 6, 2019): Ok fine thanks. Than we can close that.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4249