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

Errors Out #44

Closed
3daystoday opened this issue Dec 4, 2020 · 2 comments
Closed

Errors Out #44

3daystoday opened this issue Dec 4, 2020 · 2 comments

Comments

@3daystoday
Copy link

3daystoday commented Dec 4, 2020

Hi,

I've done no changes to my setup, and it's been running fine before, but just recently noticed that the docker was stopped with this error in the log, any idea as to what could be wrong. I have a hard time figuring it out from the log:

`[INFO ] - 2020-12-04 13:49:37 @ ImdbDockerImplementation$ImdbBatchJob.run: Job returned ERROR : java.io.IOException: Java heap space

[ERROR] - 2020-12-04 13:49:37 @ ImdbDockerImplementation$ImdbBatchJob.run: CompletionException exception encountered...

[ERROR] - 2020-12-04 13:49:37 @ ImdbDockerImplementation$ImdbBatchJob.run: Please contact the maintainer of the application with the stacktrace below if you think this is unwanted behavior.

[ERROR] - 2020-12-04 13:49:37 @ ImdbDockerImplementation$ImdbBatchJob.run: ========================================

[ERROR] - 2020-12-04 13:49:37 @ ImdbDockerImplementation$ImdbBatchJob.run: java.util.concurrent.CompletionException: java.io.IOException: Java heap space

	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)

	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)

	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source)

	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

	at java.base/java.lang.Thread.run(Unknown Source)

Caused by: java.io.IOException: Java heap space

	at java.net.http/jdk.internal.net.http.HttpClientImpl.send(Unknown Source)

	at java.net.http/jdk.internal.net.http.HttpClientFacade.send(Unknown Source)

	at updatetool.common.AbstractApi.send(AbstractApi.java:49)

	at updatetool.common.TmdbApi.episodeImdbId(TmdbApi.java:100)

	at updatetool.imdb.resolvement.TmdbSeriesToImdbResolvement.lambda$resolve$4(TmdbSeriesToImdbResolvement.java:79)

	at updatetool.common.HttpRunner.run(HttpRunner.java:116)

	at updatetool.imdb.resolvement.TmdbSeriesToImdbResolvement.resolve(TmdbSeriesToImdbResolvement.java:79)

	at updatetool.imdb.resolvement.TmdbSeriesToImdbResolvement.resolve(TmdbSeriesToImdbResolvement.java:19)

	at updatetool.imdb.ImdbPipeline.lambda$analyseDatabase$0(ImdbPipeline.java:122)

	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source)

	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

	at java.base/java.lang.Thread.run(Unknown Source)

Caused by: java.lang.OutOfMemoryError: Java heap space

[ERROR] - 2020-12-04 13:49:37 @ ImdbDockerImplementation$ImdbBatchJob.run: ========================================

[ERROR] - 2020-12-04 13:49:37 @ ImdbDockerImplementation$ImdbBatchJob.run: The application will terminate now.

`



@mynttt
Copy link
Owner

mynttt commented Dec 4, 2020

Looks like you have a library with a lot of items so the default allocated memory of 256MB is not enough and causes Java to run out of memory. Something similar ever happned in #25. The solution is to set the docker environment variable JVM_MAX_HEAP to 512m to increase the amount of memory that Java can access. If it crashes again (which I don't believe) just increase it to 1g. Let me know how it works for you!

Edit: The JVM starts up in a way that unused memory is given back to the OS. So If it hits 512MB at a peak it will slim down to 30-50MB while idling again.

@3daystoday
Copy link
Author

I guess the library is starting to grow a bit heh, but that did the trick, thanks a lot! It's now working as it should again! :)

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

2 participants