-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Cannot allocate memory when viewing repository #2464
Comments
Please test if it still happens in the latest 0.8.22 version. |
There currently aren't any binaries available for that version right? I cannot compile it on the VPS:
And cross-compiling locally doesn't work either:
|
@floorish how many files in the directory that fails? |
When I add a second file to the repository, I can't open the |
OK... how much memory do you have on VPS... I can't convert for bad math 😓 |
750MB should be enough...
Just to confirm you're sure about this? |
100% looking at it right now with lots of files |
Thanks, got it... |
I'm getting this from time to time, but it works after a reload. The log shows messages like these:
There's more than enough memory available, though:
|
@dakira how many files in the directory that is having problem? |
@unknwon It's the root of the repo. 12 files, 8 folders. |
@dakira thanks, can you help confirm that 0.8.0 works fine? |
@unknwon I'm on 0.8.10. I'm not always getting this. When I hit reload all the time, I'm getting this in 1 out of 10 reloads. If it helps I can set up a new installation with 0.8.0 and try with that. |
@dakira that would be best to try again 0.8.0, so we can be more sure about where the problem is. |
Looks like I can't reproduce this with 0.8.0 while I can with 0.8.10 and 0.8.25 (by mercilessly hitting F5). Edit: I tried some more. This definately doesn't exist in 0.8.0. |
@dakira Got it, thank you! |
Can confirm for develop, too. |
This happens more often when there are more files and when Gogs has been running longer. It doesn't happen for a while after it has been restarted. Again with tons of memory available. Is there a workaround @unknwon ? |
@dakira Are you using precompiled binary or installed from source code? |
As I mentioned, I can also reproduce this in develop, compiled from source code (as of 7 days ago). |
Just to confirm, on 0.8.25 (precompiled, 386) I get the same error. I installed Gogs 0.8.25 (precompiled, amd64) on a different vps, there it works fine. They're totally different setups though, so hard to compare unfortunately. |
@unknwon as this is a regression, can I help somehow locating the problem if you can't reproduce yourself? |
Same problem on 0.8.25.0129 (precompiled, amd64). Used Gogs Migration from freebsd/freebsd-ports and get those 500 errors in. Used Gogs Migration on gogits/gogs and its seems OK. VPS: Ubuntu 14.04, 6 vCores, 8GB Ram |
@ultimatedirty what exactly do you mean by Gogs Migration? |
@dakira Top Menu Create -> New Migration |
Thanks for answering :) |
@YugoCode thanks for the prove! |
I just upgraded to 0.9.13.0318 and it seems to run well, though it feels very slow. When I go to the "Code" page to view the files on the master branch, the page loads in ~1800ms. However, when I go to view a single source file, it loads in ~400ms. Is this difference in the page load time expected? Note that I do not know how Gogs actually gets the data from git. (Does it check out the whole working tree to get a list of the files?) |
This issue is back in 0.9.20.0404. |
Hi, I'm new to Gogs but I have the same error. I'm opening 10MB, one-commit newly pushed repo and I have 500 Internal Server Error in browser and in console: Gogs version 0.9.13.0318 top output:
|
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.. and,for now, I can not cause the error again. |
@unknwon Maybe the amount of goroutines for this should be configurable?
how hard would it be to do that ? (without passing it as an argument on
every single call... 😒 )
|
@bkcsoft yes, I think it is possible as a config option. |
@unknwon Log
Memory:
Any help? I'm running on CentOS 7 and MySQL. Edit: Also noticed you've added Does this really work? |
@ubiko sorry, but really have no ideas how this problem is caused... maybe there are some limitation options we're not noticed because this is not happening to all machines (that's the hardest part for debugging). |
|
@ubiko yes, that's right... |
This is most likely related to `ulimit`, there's a couple of issues about
that already, check them out 😃
|
@ubiko The line of code you posted is fixing the problem??? I don't care if it's slow, I need it to work at least. Where do I have to put the line? Or could you build a binary with this fixed line? Thank you :) |
@bkcsoft In my case it's not related to ulimit. No limitations configured... Please add as config option! |
@unknown no worries, it's a pretty hard issue to figure out also. I gotta thank you for making Gogs before I'd complain. 👍 @YugoCode Yes it is fixing it. It's more of a workaround than a fix though, credit goes to: @lucianolorenti (Higher up in the comments) . You can fix it by modifying tree_entry.go . You need to work from the source, you can't fix this if you're using a docker/packager. You need to build the app again. |
I was also affected by this issue on the VPS. I am wondering whether maybe this has something to do with number of cores available? Because on my VPS I got this 500, but on my OrangePi gogs runs flawlessly and I don't have this error. The only difference seems to be in the architecture (VPS is i386 vs arm7 on the OrangePi) and the number of cores (OrangePi has 4 cores whereas my VPS has only one). If this is false impression, please tell me and I'll remove my comment so that I don't introduce unnecesary mess. Thank you so much for gogs! |
As @sjahreis already mentioned, a config option would be awesome! |
Something new here? |
@toudi @Mad-Onion |
There's the pull request gogs/git-module#26 from 0xbaadf00d, but unfortunetely no progress since one month... |
@WolfgangKluge This project seems to be dead. There is an extremely active fork here: https://github.com/go-gitea/gitea. I've been asked to wait for the 1.0 release before I switch over. But that should be soon. |
Please notify when this happens again. |
Happens to me as well. CentOS 6.8. Seemingly random behaviour. Latest Gogs. Let me know if you need more details. |
Happened in a docker container on google compute engine. |
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.
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:
![screen shot 2016-01-22 at 17 12 02](https://cloud.githubusercontent.com/assets/623528/12515986/5f1d4632-c12b-11e5-9db9-fe5c76e93ed9.png)
The text was updated successfully, but these errors were encountered: