merge with huge amount of diffs, 500 in UI, GetPatch: signal: killed in log #3606

Closed
opened 2025-11-02 05:18:58 -06:00 by GiteaMirror · 14 comments
Owner

Originally created by @darue-keller on GitHub (Jul 17, 2019).

  • Gitea version (or commit ref): 1.8.3
  • Git version: 2.17.1
  • Operating system: Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-1043-aws x86_64)
  • Database (use [x]):
    • PostgreSQL
    • [ X ] MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • [ X ] No
    • Not relevant
  • Log gist:
    2019/07/17 00:36:19 [...routers/repo/pull.go:929 CompareAndPullRequestPost()] [E] GetPatch: signal: killed

attempt to create Pull Request. There's a great many changed files as a large binary dependency is being swapped in, new for old. Along with many other required changes to update the dependency. After picking the To and From branches, it's about 6 seconds before the next screen of the UI appears. says at the bottom, "Some files were not shown because too many files changed in this diff " . If we then click the Create Pull Request button, it spins for Page: 60126ms Template: 2ms and gives a 500. Log shows:
2019/07/17 01:53:55 [...routers/repo/pull.go:929 CompareAndPullRequestPost()] [E] GetPatch: signal: killed

I tried changing in app.ini:
PULL_REQUEST_QUEUE_LENGTH = 10000
from the default of 1000, but this had no effect. I think this seems like a hard coded timeout is being exceeded. Possibly quick fix for this?

Thanks much,

  • Drew
Originally created by @darue-keller on GitHub (Jul 17, 2019). - Gitea version (or commit ref): 1.8.3 - Git version: 2.17.1 - Operating system: Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-1043-aws x86_64) - Database (use `[x]`): - [ ] PostgreSQL - [ X ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ X ] No - [ ] Not relevant - Log gist: 2019/07/17 00:36:19 [...routers/repo/pull.go:929 CompareAndPullRequestPost()] [E] GetPatch: signal: killed attempt to create Pull Request. There's a great many changed files as a large binary dependency is being swapped in, new for old. Along with many other required changes to update the dependency. After picking the To and From branches, it's about 6 seconds before the next screen of the UI appears. says at the bottom, "Some files were not shown because too many files changed in this diff " . If we then click the Create Pull Request button, it spins for Page: 60126ms Template: 2ms and gives a 500. Log shows: 2019/07/17 01:53:55 [...routers/repo/pull.go:929 CompareAndPullRequestPost()] [E] GetPatch: signal: killed I tried changing in app.ini: PULL_REQUEST_QUEUE_LENGTH = 10000 from the default of 1000, but this had no effect. I think this seems like a hard coded timeout is being exceeded. Possibly quick fix for this? Thanks much, - Drew
GiteaMirror added the performance/speedissue/confirmedperformance/memorytype/bug labels 2025-11-02 05:18:58 -06:00
Author
Owner

@lunny commented on GitHub (Jul 17, 2019):

Maybe you can change some timeout args on [git]

@lunny commented on GitHub (Jul 17, 2019): Maybe you can change some timeout args on `[git]`
Author
Owner

@darue-keller commented on GitHub (Jul 17, 2019):

Maybe you can change some timeout args on [git]

Nope. I already have all those values set VERY high. None of them effect this exactly 60 second timeout...

[git.timeout]
MIGRATE = 1800
MIRROR  = 1800
CLONE   = 1800
PULL    = 1800
GC      = 1800
@darue-keller commented on GitHub (Jul 17, 2019): > Maybe you can change some timeout args on `[git]` Nope. I already have all those values set VERY high. None of them effect this exactly 60 second timeout... ``` [git.timeout] MIGRATE = 1800 MIRROR = 1800 CLONE = 1800 PULL = 1800 GC = 1800 ```
Author
Owner

@darue-keller commented on GitHub (Jul 17, 2019):

also, nothing is getting killed by OOM killer. Judging by the page load timer, this always gets killed at 60 seconds. I think this is a non-exposed timeout limit, there doesn't seem to be a way to adjust it currently.

@darue-keller commented on GitHub (Jul 17, 2019): also, nothing is getting killed by OOM killer. Judging by the page load timer, this always gets killed at 60 seconds. I think this is a non-exposed timeout limit, there doesn't seem to be a way to adjust it currently.
Author
Owner

@stale[bot] commented on GitHub (Sep 16, 2019):

This issue 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 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Sep 16, 2019): This issue 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 weeks. Thank you for your contributions.
Author
Owner

@PhilsLab commented on GitHub (Jan 6, 2020):

also experiencing the same issue, even though this happens for PRs and also for the diff screen itself. No error is shown in the logs.
git diff -M dev origin/master > out.txt produces a ~2MB file.

@PhilsLab commented on GitHub (Jan 6, 2020): also experiencing the same issue, even though this happens for PRs and also for the diff screen itself. **No error is shown in the logs.** `git diff -M dev origin/master > out.txt` produces a ~2MB file.
Author
Owner

@zeripath commented on GitHub (Jan 6, 2020):

Hmm... could you check on master as following #9302 the calls to GetPatch no longer involve storing the patch in memory and should just get streamed directly to a file.

@zeripath commented on GitHub (Jan 6, 2020): Hmm... could you check on master as following #9302 the calls to GetPatch no longer involve storing the patch in memory and should just get streamed directly to a file.
Author
Owner

@fpiecka commented on GitHub (Mar 26, 2020):

We have a similar/same problem. We can replicate the issue on try.gitea.io.

Diffs are displayed correctly, but the pull request creation doesn't work. We can see nothing related in the logs.

You can easily replicate the issue with a repository at https://github.com/fpiecka/gitea-pr-fail

Import/clone the repository to try.gitea.io and try to create a PR merging branch1-link into branch1. The page will hang indefinitely in Firefox.

While playing with file sizes in the repository, I was able to get a 500 error from time to time.

@fpiecka commented on GitHub (Mar 26, 2020): We have a similar/same problem. We can replicate the issue on try.gitea.io. Diffs are displayed correctly, but the pull request creation doesn't work. We can see nothing related in the logs. You can easily replicate the issue with a repository at https://github.com/fpiecka/gitea-pr-fail Import/clone the repository to try.gitea.io and try to create a PR merging branch1-link into branch1. The page will hang indefinitely in Firefox. While playing with file sizes in the repository, I was able to get a 500 error from time to time.
Author
Owner

@zeripath commented on GitHub (Mar 27, 2020):

@fpiecka So this is I'm certain due to the memory issue in diff display. Does the PR get created?

@zeripath commented on GitHub (Mar 27, 2020): @fpiecka So this is I'm certain due to the memory issue in diff display. Does the PR get created?
Author
Owner

@hrubsa commented on GitHub (Mar 30, 2020):

The PR isn't created. However the diff is displayed correctly before creating the PR.

@hrubsa commented on GitHub (Mar 30, 2020): The PR isn't created. However the diff is displayed correctly before creating the PR.
Author
Owner

@jamoeder77 commented on GitHub (Apr 17, 2020):

I'm having this same problem. 18K deletions. PR is NOT created.

@jamoeder77 commented on GitHub (Apr 17, 2020): I'm having this same problem. 18K deletions. PR is NOT created.
Author
Owner

@darue-keller commented on GitHub (Apr 21, 2020):

still? dang, I'd been hoping this was fixed. What version are you running?

On Fri, Apr 17, 2020 at 3:40 PM jamoeder77 notifications@github.com wrote:

I'm having this same problem. 18K deletions. PR is NOT created.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/go-gitea/gitea/issues/7495#issuecomment-615494594,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AD24PKCFKXHOLTHXWTR534DRNDLFDANCNFSM4IEJPQHA
.

@darue-keller commented on GitHub (Apr 21, 2020): still? dang, I'd been hoping this was fixed. What version are you running? On Fri, Apr 17, 2020 at 3:40 PM jamoeder77 <notifications@github.com> wrote: > I'm having this same problem. 18K deletions. PR is NOT created. > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/go-gitea/gitea/issues/7495#issuecomment-615494594>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AD24PKCFKXHOLTHXWTR534DRNDLFDANCNFSM4IEJPQHA> > . >
Author
Owner

@jamoeder77 commented on GitHub (May 20, 2020):

(sorry for the delayed response).

1.10.6 built with GNU Make 4.1, go1.13.8 : bindata, sqlite, sqlite_unlock_notify
Git Version 2.8.0

Just ran into this same issue on another PR. Just as an FYI for a workaround, I've been recreating the branch in a single commit, disabling branch protection, merging the branch into the main working tree, and then re-enabling branch protection. It's not convenient but it works.

@jamoeder77 commented on GitHub (May 20, 2020): (sorry for the delayed response). 1.10.6 built with GNU Make 4.1, go1.13.8 : bindata, sqlite, sqlite_unlock_notify Git Version 2.8.0 Just ran into this same issue on another PR. Just as an FYI for a workaround, I've been recreating the branch in a single commit, disabling branch protection, merging the branch into the main working tree, and then re-enabling branch protection. It's not convenient but it works.
Author
Owner

@cammeltech commented on GitHub (Dec 16, 2020):

Run into the same problem today. The 60 second timeout of my nginx reverse proxy killed the connection.

I added som timeout settings to my http section of /etc/nginx/nginx.conf.

proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_send_timeout 300;

@cammeltech commented on GitHub (Dec 16, 2020): Run into the same problem today. The 60 second timeout of my nginx reverse proxy killed the connection. I added som timeout settings to my http section of /etc/nginx/nginx.conf. proxy_read_timeout 300; proxy_connect_timeout 300; proxy_send_timeout 300;
Author
Owner

@wxiaoguang commented on GitHub (Apr 26, 2022):

Outdated. Some code has been optimized.

@wxiaoguang commented on GitHub (Apr 26, 2022): Outdated. Some code has been optimized.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3606