Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
5 tasks
darue-keller opened this issue Jul 17, 2019 · 14 comments
Closed
5 tasks
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented performance/memory Performance issues affecting memory use performance/speed performance issues with slow downs type/bug

Comments

@darue-keller
Copy link

  • 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
@lunny
Copy link
Member

lunny commented Jul 17, 2019

Maybe you can change some timeout args on [git]

@darue-keller
Copy link
Author

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
Copy link
Author

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.

@lunny lunny added the type/bug label Jul 18, 2019
@stale
Copy link

stale bot commented 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 stale bot added the issue/stale label Sep 16, 2019
@lunny lunny added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Sep 16, 2019
@stale stale bot removed the issue/stale label Sep 16, 2019
@PhilsLab
Copy link

PhilsLab commented 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.

@zeripath zeripath added performance/memory Performance issues affecting memory use performance/speed performance issues with slow downs labels Jan 6, 2020
@zeripath
Copy link
Contributor

zeripath commented 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.

@fpiecka
Copy link

fpiecka commented 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.

@zeripath
Copy link
Contributor

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

@hrubsa
Copy link

hrubsa commented Mar 30, 2020

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

@jamoeder77
Copy link

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

@darue-keller
Copy link
Author

darue-keller commented Apr 21, 2020 via email

@jamoeder77
Copy link

(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.

@cammeltech
Copy link

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;

@wxiaoguang
Copy link
Contributor

Outdated. Some code has been optimized.

@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented performance/memory Performance issues affecting memory use performance/speed performance issues with slow downs type/bug
Projects
None yet
Development

No branches or pull requests

8 participants