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

Internal error: unable to commit [ENOUGH] bytes of memory #4232

Closed
ghost opened this issue Aug 14, 2018 · 15 comments
Closed

Internal error: unable to commit [ENOUGH] bytes of memory #4232

ghost opened this issue Aug 14, 2018 · 15 comments

Comments

@ghost
Copy link

ghost commented Aug 14, 2018

General summary/comments (optional)

When running stack ghci
for the first time and it tries to install it I get Internal error: unable to commit [ENOUGH] bytes of memory where ENOUGH is approx. a gigabyte. My server has only 1G of ram.

BUT, after that, ghci runs fine and is indeed installed in .stack.

I could use a swap file or just upgrade my server but I thought it wasn’t normal for stack to consume such an amount of memory.

Steps to reproduce

On a DigitalOcean 1G droplet:

  1. Install stack
  2. stack ghci

Stack version

$ stack --version
Version 1.7.1, Git revision [...] x86_64 hpack-0.28.2

Method of installation

  • curl https://get.haskellstack.org | sh
@ghost
Copy link
Author

ghost commented Aug 14, 2018

very wierd.
So if I understand you well. the installation does not end with a message that stack is installed somewhere.

@ghost
Copy link
Author

ghost commented Aug 14, 2018 via email

@ghost
Copy link
Author

ghost commented Aug 14, 2018

oke, we will investigate this.

@ghost
Copy link
Author

ghost commented Aug 14, 2018

I don’t know if it helps but it also happens when running ‘stack ghc’ or just ‘stack’ in a new project for the first time when no ghc is installed.

I encountered the very same error two months ago I believe and I’m pretty sure I solved it by temporarily upgrading my droplet with a few gb of memory.

@ghost
Copy link
Author

ghost commented Aug 14, 2018

Can you add a swap file to your enviroment and try again to install stack.

@ghost
Copy link
Author

ghost commented Aug 14, 2018

then it looks not a bug in stack but a problem with your digital ocean enviroment.

@ghost
Copy link
Author

ghost commented Aug 14, 2018

I’m testing with Fedora 28 right now. (I was using Debian 9.)

@ghost
Copy link
Author

ghost commented Aug 14, 2018

oke, hopefully with a swap file or more memory. I think that is more the problem then the distro.

@ghost
Copy link
Author

ghost commented Aug 14, 2018

So it is normal for stack to consume more than 1G of memory for running ? I mean, of course the issue is the memory here since I solved it the issue by adding more.

Update: yep, same error on Fedora with 1G of memory.

@ghost
Copy link
Author

ghost commented Aug 14, 2018

can it be that the memory is too little on the updating the Hackage index cache,
That is going to be fixed soon. Otherwise stack should not take that lot of memory

@ghost
Copy link
Author

ghost commented Aug 14, 2018

Can you paste a log where we can see where the memory is too little.

@ghost
Copy link
Author

ghost commented Aug 14, 2018

Here it is:
http://ix.io/1kbn

It seems related to Hackage’s index cache indeed.

@ghost
Copy link
Author

ghost commented Aug 14, 2018

oke, that problem is well known and being solved in one of the next versions.
Can I close this issue or do you have other questions

@ghost
Copy link
Author

ghost commented Aug 14, 2018 via email

@ghost ghost closed this as completed Aug 14, 2018
@bsdshell
Copy link

when I try to use stack build for regex-tdfa, I have the same memory issue in my Ubuntu 1G vm.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant