gogs: Cannot allocate memory when viewing repository
On v0.8.10 I get a 500 error whenever I want to open a repo with more than one file. I can access the other tabs (Issues/commits etc.), but the Code tab always results in an error.
[Macaron] Started GET /floorish/test for 77.*.*.*
2016/01/22 16:30:14 [...routers/repo/view.go:134 Home()] [E] GetCommitsInfo: GetCommitByPath (/readme.md): fork/exec /usr/bin/git: cannot allocate memory
[Macaron] Completed /floorish/test 500 Internal Server Error in 88.956623ms
Just a simple test repository with a single readme.md
works fine, but when I add another file I can’t view the Code tab anymore.
Gogs works perfectly fine on v0.8.0 using the exact same config.
Actual memory usage looks fine as well:
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 81 (45 by maintainers)
I ran into the same problem with my server. Apparently it is related with the number of concurrent tasks performed in GetCommitsInfo of the Entries type: tree_entry.go.. I changed taskChan := make(chan bool, 10) to taskChan := make(chan bool, 2)
and,for now, I can not cause the error again.
@bkcsoft In my case it’s not related to ulimit. No limitations configured…
Please add as config option!
@bkcsoft yes, I think it is possible as a config option.
There’s the pull request gogits/git-module#26 from 0xbaadf00d, but unfortunetely no progress since one month…