-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 fork, out of memory when compiling #4637
Comments
Out of curiosity:
|
Aside this issue:
|
I'll check this out now! Thanks guys :) |
and
will let you know if i see this again |
Whoops! just happened, but worse this time.
|
Seems to be happening more with crystal 0.23.0 and llvm 3.8.1 |
I actually can't get it to successfully compile at all, even after a reboot |
@akzhan @kirbyfan64 you both have invitations waiting for you if you want to check out the new source code |
What is the output of |
@styler1972 how about using swap memory? |
A total of 484 MB memory with no swap could be a bit to low for Crystal compiler. You're probably gonna need more space. |
Yeah, you definitely don't have enough memory for compiling Crystal code. Type inference is expensive! Try making sure nothing else is open before compiling, too. It doesn't look like you have anything else open, but Chrome/Electron-based applications can use quite a bit. |
@mverzilli I'm not sure this is a bug. Compiling Crystal programs require considerable amounts of memory - that's a trade-off we make for awesomeness. We always want to lower the memory amount needed, but as long as we can still compile the compiler in a 32bit environment (~4GB), I wouldn't consider this a major bug we should fix ASAP. TL;DR: I'd remove this from 0.23.1 |
Cool. I thought the problem was worsened by 0.23, but I guess you're right, it doesn't merit a hotfix. |
I think using the newer LLVM 3.8 implies you need more memory to compile, so that's a good reason for the bug to happen more often with 0.23.0, but I don't thinks it's enough for a hotfix anyway. I'd think about that if there's any pretty common scenario in which this change makes things really worse (say, previously compiling apps now hitting Docker Hub's automated build memory limits), but not as is. PRs and suggestions on improvements on memory footprint are always welcome, anyways! BTW, @styler1972 building with |
If it's a VM maybe you can add some swap? Anyway (as a note to followers) building without "--release" builds using much less RAM FWIW. Also you might be able to build "for it" on a different box and copy it over there. Though maybe there's something that could be done internally to help as well. GL! |
Crystal needs a lot of memory to compile, and we know it. There's nothing immediate that we can do here, so I'm closing this. |
I was able to get this to compile and run, and then it stopped compiling and gave me the following error.
Previous output:
Error:
Source:
Thanks! Great work!
Crystal 0.22.0 [3c71228] (2017-04-20) LLVM 3.5.0
The text was updated successfully, but these errors were encountered: