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

OutOfMemoryError: Java heap space #50

Open
lczech opened this issue Nov 18, 2020 · 6 comments
Open

OutOfMemoryError: Java heap space #50

lczech opened this issue Nov 18, 2020 · 6 comments

Comments

@lczech
Copy link

lczech commented Nov 18, 2020

Hi there!

I am using DamageProfiler 1.1 via the conda package, which means that the call to run the command line version simply is

damageprofiler [options]

instead of the call

java -jar DamageProfiler-VERSION.jar [options]

that is given in the documentation.

Now, for some large datasets, I am getting

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

and my guess after a bit of searching is that I need to provide Java with

-Xmx<amount of memory>

for this to work (NB: WTF Java?! Just use the available memory!).

My questions here are: Is that indeed the solution to the issue? And if so, how do I provide this with the conda version? Trying to locate the jar file within the conda env directory does not seem like a robust idea - what is the canonical way of solving this?

Thanks in advance and so long
Lucas

@JudithNeukamm
Copy link
Collaborator

Hi Lucas,
sorry for the late reply.
Actually, that's the way I usually solve this issue ;)

However, you can try to increase the general JVM heap space used for java applications (However, I'm not sure if this also works for the conda package): export _JAVA_OPTIONS="-Xms512m -Xmx1024m"

Let me know if that works!
I'll try to find another/an additional solution. Or @jfy133 do you have any idea?

@jfy133
Copy link
Contributor

jfy133 commented Nov 23, 2020

I'm pretty sure I've done it somehow inthe past but can't remember atm.

At least the python script used with the damageprofiler variable, that calls the jar includes the following line:

https://github.com/bioconda/bioconda-recipes/blob/73395171feca2b41f495c660b91964d5e70f7d1e/recipes/damageprofiler/damageprofiler.py#L16

I guess 'default' would imply it's changeable, but won't be able to check until tomorrow. @apeltzer has more bioconda experience though!

@jfy133
Copy link
Contributor

jfy133 commented Nov 23, 2020

Quickly looking at the script, maybe try damageprofiler -Xm 000g?

Regardless, congrats on having so many read s;) b

@apeltzer
Copy link
Contributor

Linking to an issue in one of my other pipelines for bacterial assembly, where we had similar issues: nf-core/bacass#28

Recommendation was to simply replace it - see here bioconda/bioconda-recipes#24749

e.g. a damageprofiler -Xmx64g could already do the trick maybe?

@JudithNeukamm
Copy link
Collaborator

Hi @lczech
could this solve your problem?

@lczech
Copy link
Author

lczech commented Dec 20, 2020

Hi @JudithNeukamm,

thanks for the follow up. Unfortunately, I did not yet get back to that project, so as of now, I don't know whether that solution works. I'll post here once I know.

Thank you and all the best
Lucas

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

No branches or pull requests

4 participants