question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why the heap gets filled so fast?

See original GitHub issue

Summary

I am very happy you are providing a port for Scala! It seems there is a memory leak, and I could not see a discussion about it: so I thought to start one.

I have just run this on an medium sized project with JAVA_OPTS="-Xms512m -Xmx12g " sbt stryker, and this is the state of the heap when it got to 40% of the test execution:

strykerStats40%jpg

Now I guess you are running the test executions in parallel, but why they are not releasing resources? Any chance you could give a high level design of the test execution, so I could give a look into diagnose which bit of the codebase most likely is stealing resources? I would be happy to make this more usable for big projects.

Stryker4s config

stryker4s {
  mutate: [ "domain/src/main/scala/**/*.scala" ]
  test-filter: [ "xxx.yyyy.*" ]
  excluded-mutations: [
    "EqualityOperator",
    # "BooleanLiteral",
    # "ConditionalExpression",
    # "LogicalOperator",
    # "StringLiteral",
    # "MethodExpression"
  ]
}

Stryker4s environment

stryker4s 0.8.1

Your Environment

software version(s)
Scala version 2.12.10
Build tool & version sbt
Operating System Ubuntu 20.04

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
hugo-vrijswijkcommented, Sep 15, 2020

That is awesome to hear and certainly a good way to fix leaks 😁

1reaction
ag91commented, Sep 15, 2020

Well it ran too fast for any metrics! Well done @hugo-vrijswijk ! I think we can close this 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why heap is getting full very fast with this code? - Stack Overflow
The memory is getting full(with 30gb size) in 5 minutes. With this code, I just want to read the text file(3gb) entries into...
Read more >
What happens when heap memory is full? - Quora
The right answer is: stack is catastrophically faster than heap! Here's why: When you allocate a new memory block on the heap (with...
Read more >
Top 4 Java Heap related issues and how to fix them
Java heap related issues can cause severe damage to your application that will directly result in poor end user experience.
Read more >
Stack vs Heap Memory Allocation - GeeksforGeeks
Memory allocation and de-allocation are faster as compared to Heap-memory allocation. Stack memory has less storage space as compared to ...
Read more >
Tuning the Memory Management System - Oracle Help Center
A small heap will become full quickly and must be garbage collected more often. It is also prone to more fragmentation, making object...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found