bisq
bisq copied to clipboard
Java Heap Space error
Description
Java Heap Space error. No other info.Version
v1.6.4Steps to reproduce
One time occurenceExpected behaviour
UnknownActual behaviour
UnknownScreenshots
SS java heap space error 6-1-2021.odt
Device or machine
Win 10 ProAdditional info
I saved the log file, but can't find it. How do I redisplay it from within the UI? Thanks.
@ThisMightHelp You can find the log file here: https://bisq.wiki/Data_directory#Windows
Unfortunately I wasn't able to display the screenshot file you posted. For how long did your client run before this happened? How much RAM do you have available on your machine?
I have the same problem on Linux Ubuntu with Oracle Hotspot Java / OpenJDK JRE.
From the logs:
Jun-02 08:04:51.803 [Write-DaoStateStore_to-disk] ERROR b.c.s.CommonSetup: Uncaught Exception from thread Write-DaoStateStore_to-disk
Jun-02 08:04:51.803 [Write-DaoStateStore_to-disk] ERROR b.c.s.CommonSetup: throwableMessage= Java heap space
Jun-02 08:04:51.803 [Write-DaoStateStore_to-disk] ERROR b.c.s.CommonSetup: throwableClass= class java.lang.OutOfMemoryError
Jun-02 08:04:51.803 [Write-DaoStateStore_to-disk] ERROR b.c.s.CommonSetup: Stack trace:
java.lang.OutOfMemoryError: Java heap space
Usually it happens 1-2x a day, my machine runs 6GB RAM. Linux bisq 5.11.0-18-generic #19-Ubuntu SMP Fri May 7 14:22:03 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Thanks ripcurlz. The screenshot was the same as marekbedy's. It happened once before, but otherwise Bisq seems ok. Bisq was running for a few hours when the error popped up. Running Win 10 Pro and 32GB RAM.
I have been getting this message once or twice a day both in 1.64 and 1.6.5. Sometimes able to continue, sometimes requires a force close and restart.
Also Bisq is freezing about once a day with no error message and requires a forced shutdown, not sure if related.
Thanks.
This all sounds a little bit as if the launch parameters for the VM are not passed successfully. As we changed the packaging of the installer this could be the case for this issue. I'll investigate this today.
Or the new VM is more resource hungry than the old one. Could you please try to manually increase the max RAM ceiling we have in place right now (4 GB)? See https://bisq.wiki/Reducing_memory_usage on how to do this.
If this fixes it, we have to adapt the value for the next release.
You can see all the default jvm opts with java -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal -version
.
I just looked at JDK 16's, and the default MaxRAM
is still 128 Gb: uint64_t MaxRAM = 137438953472
I'm sure it's the same in JDK 15.
Did anyone of you had success increasing the max memory flag as described in https://bisq.wiki/Reducing_memory_usage?
I tried it with JAVA_TOOL_OPTIONS="-XX:MaxRAM=8g"
Seemed to last a little longer but still crashed with the same error.
I will try again with a higher number.
The Java Heap Space Errors seem to becoming for frequent. Every few hours or so.
🤔 this seems to become more and more of an issue. Not sure if it is related to code changes introduced in v1.6.5+ or the new VM and runtime.
Try disabling the hardware graphics acceleration with https://github.com/bisq-network/bisq/issues/5362#issuecomment-808793182, curious if the issue still happens afterwards.
Sometimes JavaFX has issues with specific graphic cards with specific drivers. From what I read in different forums, disabling hardware acceleration bypasses some of these issues.
Been running all day with no crashes when I upped it to 16gb: JAVA_TOOL_OPTIONS="-XX:MaxRAM=16g"
Not tried disabling the hardware graphics acceleration yet.
Crashes where still happening pretty frequently so edited the Bisq.cfg file in Local\Bisq\app to the below to include @cd2357's suggestion, it has seemed to fix a few memory issues. Hopefully it will resolve the Java heap space error also:
[Application] app.classpath=$APPDIR\desktop-1.6.5-all.jar app.mainclass=bisq.desktop.app.BisqAppMain
[JavaOptions] java-options=-Xss1280k java-options=-XX:MaxRAM=32g java-options=-Djava.net.preferIPv4Stack=true java-options=--module-path java-options=$APPDIR\mods
[JVMOptions] -Dprism.order=sw
If we enough data we probably should add this parameters as defaults for the built binaries.
I have not had a java heap space error since editing the Bisq.cfg file 3 days ago.
-Dprism.order=sw helps for me, now a week without a crash
More Java heap space today's on VERSION=1.7.0
[JavaFX Application Thread] INFO b.c.p.PersistenceManager: Serializing DaoStateStore took 685 msec [JavaFX Application Thread] ERROR b.c.s.CommonSetup: Uncaught Exception from thread JavaFX Application Thread [JavaFX Application Thread] ERROR b.c.s.CommonSetup: throwableMessage= Java heap space [JavaFX Application Thread] ERROR b.c.s.CommonSetup: throwableClass= class java.lang.OutOfMemoryError [JavaFX Application Thread] ERROR b.c.s.CommonSetup: Stack trace: java.lang.OutOfMemoryError: Java heap space at java.base/java.util.HashMap.newNode(Unknown Source) at java.base/java.util.HashMap.putVal(Unknown Source) at java.base/java.util.HashMap.putIfAbsent(Unknown Source) at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Unknown Source) at java.base/java.util.stream.Collectors$$Lambda$42/0x0000000100113b98.accept(Unknown Source) at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(Unknown Source) at java.base/java.util.HashMap$EntrySpliterator.forEachRemaining(Unknown Source) at java.base/java.util.stream.ReferencePipeline$Head.forEach(Unknown Source) at java.base/java.util.stream.ReferencePipeline$7$1.accept(Unknown Source) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source) at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source) at bisq.network.p2p.storage.persistence.AppendOnlyDataStoreService.getMap(AppendOnlyDataStoreService.java:87) at bisq.network.p2p.storage.P2PDataStorage.addPersistableNetworkPayload(P2PDataStorage.java:679) at bisq.network.p2p.storage.P2PDataStorage.lambda$onMessage$22(P2PDataStorage.java:593) at bisq.network.p2p.storage.P2PDataStorage$$Lambda$1442/0x00000001007d1d10.accept(Unknown Source) at java.base/java.util.Optional.ifPresent(Unknown Source) at bisq.network.p2p.storage.P2PDataStorage.onMessage(P2PDataStorage.java:583) at bisq.network.p2p.network.NetworkNode.lambda$onMessage$6(NetworkNode.java:392) at bisq.network.p2p.network.NetworkNode$$Lambda$1329/0x00000001007ac170.accept(Unknown Source) at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source) at java.base/java.util.stream.ReferencePipeline$Head.forEach(Unknown Source) at bisq.network.p2p.network.NetworkNode.onMessage(NetworkNode.java:392) at bisq.network.p2p.network.Connection.lambda$onBundleOfEnvelopes$11(Connection.java:470) at bisq.network.p2p.network.Connection$$Lambda$1441/0x00000001007d1ae0.accept(Unknown Source) at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(Unknown Source) at java.base/java.util.concurrent.CopyOnWriteArraySet.forEach(Unknown Source) at bisq.network.p2p.network.Connection.lambda$onBundleOfEnvelopes$12(Connection.java:470) at bisq.network.p2p.network.Connection$$Lambda$1440/0x00000001007d18c0.run(Unknown Source)
Could you please try out to increase the max ram limit as described in https://bisq.wiki/Reducing_memory_usage? We'll adapt the default value for the next release if it isn't a memory leak we can fix.
I encountered the same issue on a MacOS BigSur v11.4
Same issue here on MacOS High Sierra 10.13.6 with 8GB RAM
Version 1.7.0 on Windows 10. My CPU fan suddenly started running on full speed so I checked Task Manager and saw Bisq consuming >90% of CPU power, a few seconds later it gives the "Java heap space" error and apparently starts working fine again.
Version 1.7.0 on Debian 10.9. I can't even keep Bisq running for longer than 5 minutes before it crashes/hangs saying "java.lang.OutOfMemoryError: Java heap space". I think it was a little more stable on older versions, where it could run for at least 1-2 hours before crashing but that could just be the conditions of my system. I have 2 GB ram and 4 GB swap on my desktop. A lot of memory is taken up by bitcoind, chrome, and other desktop apps. So it does seem to swap a lot, BUT i still usually have > 1.5 GB of swap free. So I'm not sure why it's running out of memory.
Just following up that I have not had a java heap space error since editing the Bisq.cfg file 28 days ago.
I did need to update the Bisq.cfg when upgrading to 1.7.0 as it was overwritten by the update.
It now reads:
[Application] app.classpath=$APPDIR\desktop-1.7.0-all.jar app.mainclass=bisq.desktop.app.BisqAppMain
[JavaOptions] java-options=-Xss1280k java-options=-XX:MaxRAM=32g java-options=-Djava.net.preferIPv4Stack=true java-options=--module-path java-options=$APPDIR\mods
[JVMOptions] -Dprism.order=sw