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

Java cannot allocate memory (sbt) #1365

Closed
pradyuman opened this issue Nov 15, 2016 · 9 comments
Closed

Java cannot allocate memory (sbt) #1365

pradyuman opened this issue Nov 15, 2016 · 9 comments

Comments

@pradyuman
Copy link

pradyuman commented Nov 15, 2016

  • A brief description
    I'm trying to run the sbt console, and after some time, the sbt console stops working with a "Cannot allocate memory" error.

  • Expected results
    sbt console works as normal

  • Actual results (with terminal output if applicable)
    image

  • Your Windows build number
    14965

  • Steps / All commands required to reproduce the error from a brand new installation

  1. Launch sbt
  2. Wait some time
  • Required packages and commands to install
    sbt
@pradyuman
Copy link
Author

pradyuman commented Nov 15, 2016

I have tried increasing my paging memory to min 5GB max 10GB and it still doesn't work (computer has about 3GB of regular memory available).

image

@glenstarchman
Copy link

Strange... sbt has been one thing that has been rock solid for me over the last several builds. What version of sbt are you using? Do you have a custom launch script? What happens if you do sbt -mem 2048?

@pradyuman
Copy link
Author

I'm using sbt 13.13 with no launch script. I'll try with sbt -mem 2048 and get back to you.

@vladbat00
Copy link

Having the same issue... sbt -mem 2048 doesn't help. Btw, despite exceptions, sbt (and console) actually starts and basic commands work. But anyway that's not normal

@pradyuman
Copy link
Author

Yeah sbt -mem 2048 didn't fix anything for me either.

@vladbat00
Copy link

Update. Sorry, my issue is a little bit different. I have the same exception messages, but I receive them on sbt start, but not after some time..

I'm trying to run the sbt console, and after some time, the sbt console stops working with a "Cannot allocate memory" error.

@pradyuman
Copy link
Author

Ah ok. sbt will start for me as well (with the memory exceptions) but it's very inconsistent with when commands will actually run in the console and when everything just fails.

@wsargent
Copy link

Make sure you have enough memory for SBT as well:

export JAVA_OPTS="-Xmx2G -Xss2M -XX:MaxMetaspaceSize=512M -XX:ReservedCodeCacheSize=192M -Dfile.encoding=UTF-8"

From https://gist.github.com/wsargent/072319c2100ac0aea4305d6f6eeacc08#set-useful-lower-bounds-for-sbt

@benhillis
Copy link
Member

Marking this as a duplicate of #851 - see my comment about the incoming fix #851 (comment)

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

6 participants