Possible memory leak in Tasks.scala
See original GitHub issueI have a relatively large multimodule project (30+modules) which, thanks to hadoop, transitively depends on about half of maven-central.
When I perform project-wise operations like sbt update
(or hitting Refresh Project
in intelliJ), the JVM ends up in OutOfMemoryError
(GC overhead limit exceeded). The same operation with coursier plugin disabled works fine (as long as wasting 10+ minutes can be considered as fine 😃 ).
Upon heap dump investigation (which is definitely not one of my strongest skills), it appears that the heap contains millions (40+) of HashMap entries, many of whose nearest GC-root seems to be the reportsCache
created here.
The version used is 1.0.0-M14-9
Illustration : http://imgur.com/a/PS37A
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Memory leak in Scala and processes - java - Stack Overflow
First capture a heap dump when your application crashes due to an out of memory issue. Add the following flags when starting the...
Read more >Out of Memory Error (Possible Memory Leak in Scala?) #508
It looks like your application ran out of memory a few times last night, which may be a contributing factor. [0] We can...
Read more >Memory Leak In Scala And Processes - ADocLib
Memory leaks block access to resources and cause an application to consume more memory over time leading to degrading system performance. If. The...
Read more >Memory leaks in Scala Future ? : r/scala - Reddit
He talks about ScalaZ Task. At 7:15 - 7:40 he says that Futures can leak memory. Is it true and can anyone explain...
Read more >A step-by-step guide for debugging memory leaks in Spark ...
If a task fails more than four (4) times (if spark.task. ... What this essentially means is that enough memory must be available...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I confirm, the memory problems seem to be fixed by #462 Thx a lot
I finally managed to work around the problem using the following JVM options for SBT :
(Thanks to @samklr’s advice)