Big pull requests: "get diff: execution was timed out"

Gogs version: 0.12.1
System: Windows Server 2012 R2 standard
DB: SQLite
Git for windows: (latest)
CPU: Intel Xeon E5 2620
RAM: 12Gb


I’ve been using Gogs for one year now and everything works well but some big pull requests.
When selecting the second branch upon pull request creation, I have the error in the title. Refreshing the page does the same.
I know that I’m using windows and git for windows is really slow and I would like to increase the timeout.
Is there a way to increase it or to speed up my git diff?

Thank you

Hi! To be clear, which page exactly you’re seeing this error?

  1. Compare page, which PR is not yet created
  2. PR has created, the “files changed” page

Hi, thank you for your answer.

It’s 1 :slight_smile:
But I had some timeout in case 2 too so it would be great if I could increase both.

Thanks! Gogs doesn’t currently have dedicated setting for diff timeout, before any patch is available, you can modify this line:


var opt DiffOptions
if len(opts) > 0 {
    opt = opts[0]
opt.Timeout = 10 * time.Minute
diff, err := repo.Diff(rev, maxFiles, maxFileLines, maxLineChars, opt)

This should effectively increase the diff operation timeout to 10 minutes.

Issue filed for your request:

Great! Thank you for your active support

FYI, it is now possible to set timeout via app.ini on 0.13.0+dev (main branch).