High memory usage
Closed this issue · 9 comments
Description
Hi Rakambda,
as always, I love this project and use it alot, keep up the good work!
When I updated from version 2.2.10.0 to 2.2.15.0 and 2.2.16.0 I'm experiencing some problems with high ram usage. I restarted the miner yesterday evening and about 12 hours later the java process is using almost 2GB of ram.
Before the restart yesterday I had exceptions about out of memory when retrieving inventory/streamer info syncing followed by HTTP connection timeouts and GQL errors etc. These errors are probably caused by the out of memory, so I don't know if it will be all that useful to pin point the problem. I guess somewhere something is causing a memory leak, but I'm not sure.
I'm not using docker, I'm running the miner in a linux screen process on a Raspberry PI with 4 GB ram.
I'm using a sqlitedb for the analytics.
If you need more information, let me know!
Upfront thanks for looking at it!
Version / commit
2.2.16.0
Relevant log output
Some examples (I replaced the streamer's name with <streamer> for privacy, if you need them I can give it):
2024-06-07T00:13:12,510 ERROR <streamer>- Failed to sync inventory
java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space
at fr.rakambda.channelpointsminer.miner.api.gql.gql.GQLApi.postGqlRequest(GQLApi.java:126) ~[miner-shaded.jar:?]
at fr.rakambda.channelpointsminer.miner.api.gql.gql.GQLApi.inventory(GQLApi.java:178) ~[miner-shaded.jar:?]
at fr.rakambda.channelpointsminer.miner.runnable.SyncInventory.run(SyncInventory.java:40) [miner-shaded.jar:?]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
at java.base/java.lang.Thread.run(Thread.java:840) [?:?]
Caused by: java.lang.OutOfMemoryError: Java heap space
2024-06-07T00:13:13,069 ERROR - Failed to send all Spade minutes watched
kong.unirest.core.UnirestException: java.io.IOException: HTTP/1.1 header parser received no bytes
at kong.unirest.core.Interceptor.onFail(Interceptor.java:79) ~[miner-shaded.jar:?]
at kong.unirest.core.CompoundInterceptor.lambda$onFail$2(CompoundInterceptor.java:54) ~[miner-shaded.jar:?]
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1602) ~[?:?]
at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129) ~[?:?]
at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527) ~[?:?]
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513) ~[?:?]
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150) ~[?:?]
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647) ~[?:?]
at kong.unirest.core.CompoundInterceptor.onFail(CompoundInterceptor.java:56) ~[miner-shaded.jar:?]
at kong.unirest.core.java.JavaClient.request(JavaClient.java:77) ~[miner-shaded.jar:?]
at kong.unirest.core.BaseRequest.request(BaseRequest.java:350) ~[miner-shaded.jar:?]
at kong.unirest.core.BaseRequest.asEmpty(BaseRequest.java:191) ~[miner-shaded.jar:?]
at fr.rakambda.channelpointsminer.miner.api.twitch.TwitchApi.sendPlayerEvents(TwitchApi.java:116) ~[miner-shaded.jar:?]
at fr.rakambda.channelpointsminer.miner.runnable.SendSpadeMinutesWatched.send(SendSpadeMinutesWatched.java:48) ~[miner-shaded.jar:?]
at fr.rakambda.channelpointsminer.miner.runnable.SendMinutesWatched.run(SendMinutesWatched.java:49) [miner-shaded.jar:?]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
at java.base/java.lang.Thread.run(Thread.java:840) [?:?]
Caused by: java.io.IOException: HTTP/1.1 header parser received no bytes
at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:586) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:123) ~[java.net.http:?]
at kong.unirest.core.java.JavaClient.request(JavaClient.java:69) ~[miner-shaded.jar:?]
... 11 more
Caused by: java.io.IOException: HTTP/1.1 header parser received no bytes
at java.net.http/jdk.internal.net.http.common.Utils.wrapWithExtraDetail(Utils.java:348) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.Http1Response$HeadersReader.onReadError(Http1Response.java:675) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.Http1AsyncReceiver.checkForErrors(Http1AsyncReceiver.java:302) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.Http1AsyncReceiver.flush(Http1AsyncReceiver.java:268) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$LockingRestartableTask.run(SequentialScheduler.java:205) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:149) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:230) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.HttpClientImpl$DelegatingExecutor.execute(HttpClientImpl.java:157) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:305) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:274) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.Http1AsyncReceiver.onReadError(Http1AsyncReceiver.java:511) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.Http1AsyncReceiver$Http1TubeSubscriber.onComplete(Http1AsyncReceiver.java:596) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SSLTube$DelegateWrapper.onComplete(SSLTube.java:276) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SSLTube$SSLSubscriberWrapper.complete(SSLTube.java:440) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SSLTube$SSLSubscriberWrapper.onComplete(SSLTube.java:541) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper.checkCompletion(SubscriberWrapper.java:472) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper$DownstreamPusher.run1(SubscriberWrapper.java:334) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper$DownstreamPusher.run(SubscriberWrapper.java:259) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$LockingRestartableTask.run(SequentialScheduler.java:205) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:149) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:230) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:303) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:256) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper.outgoing(SubscriberWrapper.java:232) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SSLFlowDelegate$Reader.processData(SSLFlowDelegate.java:513) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SSLFlowDelegate$Reader$ReaderDownstreamPusher.run(SSLFlowDelegate.java:268) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$LockingRestartableTask.run(SequentialScheduler.java:205) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:149) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:230) ~[java.net.http:?]
... 3 more
Caused by: java.io.EOFException: EOF reached while reading
at java.net.http/jdk.internal.net.http.Http1AsyncReceiver$Http1TubeSubscriber.onComplete(Http1AsyncReceiver.java:596) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SSLTube$DelegateWrapper.onComplete(SSLTube.java:276) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SSLTube$SSLSubscriberWrapper.complete(SSLTube.java:440) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SSLTube$SSLSubscriberWrapper.onComplete(SSLTube.java:541) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper.checkCompletion(SubscriberWrapper.java:472) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper$DownstreamPusher.run1(SubscriberWrapper.java:334) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper$DownstreamPusher.run(SubscriberWrapper.java:259) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$LockingRestartableTask.run(SequentialScheduler.java:205) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:149) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:230) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:303) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:256) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper.outgoing(SubscriberWrapper.java:232) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SSLFlowDelegate$Reader.processData(SSLFlowDelegate.java:513) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SSLFlowDelegate$Reader$ReaderDownstreamPusher.run(SSLFlowDelegate.java:268) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$LockingRestartableTask.run(SequentialScheduler.java:205) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:149) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:230) ~[java.net.http:?]
... 3 more
2024-06-07T04:29:13,463 WARN <streamer>- Received GQL error response for ChannelPointsContext: [GQLError(message=service timeout, locations=[], path=[community, channel, communityPointsSettings, goals])]
2024-06-07T04:30:13,764 WARN <streamer>- Received GQL error response for ChannelPointsContext: [GQLError(message=service timeout, locations=[], path=[community, channel, self, communityPoints, availableClaim])]
2024-06-07T04:38:13,239 WARN <streamer>- Received GQL error response for ChannelPointsContext: [GQLError(message=service timeout, locations=[], path=[community, channel, communityPointsSettings, emoteVariants])]
2024-06-07T04:52:44,495 WARN <streamer>- Received GQL error response for ChannelPointsContext: [GQLError(message=service timeout, locations=[], path=[community, channel, communityPointsSettings])]
2024-06-07T04:54:09,994 WARN <streamer>- Received GQL error response for ChannelPointsContext: [GQLError(message=service timeout, locations=[], path=[community, channel, self, communityPoints, availableClaim])]
2024-06-07T04:55:03,394 WARN <streamer>- Received GQL error response for ChannelPointsContext: [GQLError(message=service timeout, locations=[], path=[community, channel, self, communityPoints, lastViewedContent])]
2024-06-07T05:02:23,513 WARN <streamer>- Received GQL error response for ChannelPointsContext: [GQLError(message=service timeout, locations=[], path=[community, channel, communityPointsSettings, emoteVariants])]
2024-06-07T05:10:12,464 WARN <streamer>- Received GQL error response for ChannelPointsContext: [GQLError(message=service timeout, locations=[], path=[community, channel, self, communityPoints])]
2024-06-07T05:12:28,678 WARN <streamer>- Received GQL error response for ChannelPointsContext: [GQLError(message=service timeout, locations=[], path=[community, channel, self, communityPoints, activeMultipliers])]
2024-06-07T05:13:34,325 WARN <streamer>- Received GQL error response for ChannelPointsContext: [GQLError(message=service timeout, locations=[], path=[community, channel, self, communityPoints, lastViewedContent])]
2024-06-07T05:15:19,231 WARN <streamer>- Received GQL error response for ChannelPointsContext: [GQLError(message=service timeout, locations=[], path=[community, channel, self, communityPoints, lastViewedContent])]
2024-06-07T05:22:22,830 WARN <streamer>- Received GQL error response for ChannelPointsContext: [GQLError(message=service timeout, locations=[], path=[community, channel, self, communityPoints])]
2024-06-07T05:26:49,161 WARN <streamer>- Received GQL error response for ChannelPointsContext: [GQLError(message=service timeout, locations=[], path=[community, channel, communityPointsSettings, automaticRewards])]
2024-06-07T05:49:53,132 WARN <streamer>- Received GQL error response for ChannelPointsContext: [GQLError(message=service timeout, locations=[], path=[community, channel, self, communityPoints, userRedemptions])]
2024-06-07T05:54:58,120 WARN <streamer>- Received GQL error response for ChannelPointsContext: [GQLError(message=service error, locations=[], path=[currentUser, communityPoints, lastViewedContent])]
2024-06-07T06:02:30,420 WARN <streamer>- Received GQL error response for ChannelPointsContext: [GQLError(message=service timeout, locations=[], path=[community, channel, communityPointsSettings])]
2024-06-07T06:12:07,551 WARN <streamer>- Received GQL error response for ChannelPointsContext: [GQLError(message=service timeout, locations=[], path=[community, channel, self, communityPoints, lastViewedContent])]
2024-06-07T06:12:23,283 WARN <streamer>- Received GQL error response for ChannelPointsContext: [GQLError(message=service timeout, locations=[], path=[currentUser, communityPoints, lastViewedContent])]
2024-06-07T06:39:09,340 WARN <streamer>- Received GQL error response for ChannelPointsContext: [GQLError(message=service timeout, locations=[], path=[community, channel, communityPointsSettings, goals])]
2024-06-07T04:28:12,917 ERROR - Failed to send all Spade minutes watched
kong.unirest.core.UnirestException: java.net.http.HttpConnectTimeoutException: HTTP connect timed out
at kong.unirest.core.Interceptor.onFail(Interceptor.java:79) ~[miner-shaded.jar:?]
at kong.unirest.core.CompoundInterceptor.lambda$onFail$2(CompoundInterceptor.java:54) ~[miner-shaded.jar:?]
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1602) ~[?:?]
at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129) ~[?:?]
at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527) ~[?:?]
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513) ~[?:?]
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150) ~[?:?]
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647) ~[?:?]
at kong.unirest.core.CompoundInterceptor.onFail(CompoundInterceptor.java:56) ~[miner-shaded.jar:?]
at kong.unirest.core.java.JavaClient.request(JavaClient.java:77) ~[miner-shaded.jar:?]
at kong.unirest.core.BaseRequest.request(BaseRequest.java:350) ~[miner-shaded.jar:?]
at kong.unirest.core.BaseRequest.asEmpty(BaseRequest.java:191) ~[miner-shaded.jar:?]
at fr.rakambda.channelpointsminer.miner.api.twitch.TwitchApi.sendPlayerEvents(TwitchApi.java:116) ~[miner-shaded.jar:?]
at fr.rakambda.channelpointsminer.miner.runnable.SendSpadeMinutesWatched.send(SendSpadeMinutesWatched.java:48) ~[miner-shaded.jar:?]
at fr.rakambda.channelpointsminer.miner.runnable.SendMinutesWatched.run(SendMinutesWatched.java:49) [miner-shaded.jar:?]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
at java.base/java.lang.Thread.run(Thread.java:840) [?:?]
Caused by: java.net.http.HttpConnectTimeoutException: HTTP connect timed out
at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:567) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:123) ~[java.net.http:?]
at kong.unirest.core.java.JavaClient.request(JavaClient.java:69) ~[miner-shaded.jar:?]
... 11 more
Caused by: java.net.http.HttpConnectTimeoutException: HTTP connect timed out
at java.net.http/jdk.internal.net.http.MultiExchange.toTimeoutException(MultiExchange.java:580) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.MultiExchange.getExceptionalCF(MultiExchange.java:527) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.MultiExchange.lambda$responseAsyncImpl$7(MultiExchange.java:447) ~[java.net.http:?]
at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934) ~[?:?]
at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:911) ~[?:?]
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2162) ~[?:?]
at java.net.http/jdk.internal.net.http.common.SSLFlowDelegate.stopOnError(SSLFlowDelegate.java:983) ~[java.net.http:?]
at java.base/java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:990) ~[?:?]
at java.base/java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:974) ~[?:?]
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2162) ~[?:?]
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper$DownstreamPusher.run1(SubscriberWrapper.java:295) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper$DownstreamPusher.run(SubscriberWrapper.java:259) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$LockingRestartableTask.run(SequentialScheduler.java:205) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:149) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:230) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:303) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:256) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper.errorCommon(SubscriberWrapper.java:419) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SSLFlowDelegate$Reader.errorCommon(SSLFlowDelegate.java:366) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper.onError(SubscriberWrapper.java:410) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.SocketTube$InternalReadPublisher$ReadSubscription.signalCompletion(SocketTube.java:637) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.SocketTube$InternalReadPublisher$InternalReadSubscription.read(SocketTube.java:821) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.SocketTube$SocketFlowTask.run(SocketTube.java:181) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:230) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:303) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:256) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.SocketTube$InternalReadPublisher$InternalReadSubscription.signalError(SocketTube.java:770) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.SocketTube.signalClosed(SocketTube.java:159) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.PlainHttpConnection.close(PlainHttpConnection.java:372) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.AsyncSSLConnection.close(AsyncSSLConnection.java:111) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.Http1Exchange.cancelImpl(Http1Exchange.java:492) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.Http1Exchange.cancel(Http1Exchange.java:427) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.Exchange.cancel(Exchange.java:238) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.MultiExchange.cancel(MultiExchange.java:260) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.ResponseTimerEvent.handle(ResponseTimerEvent.java:71) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.HttpClientImpl.purgeTimeoutsAndReturnNextDeadline(HttpClientImpl.java:1270) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.run(HttpClientImpl.java:858) ~[java.net.http:?]
Caused by: java.net.ConnectException: HTTP connect timed out
at java.net.http/jdk.internal.net.http.MultiExchange.toTimeoutException(MultiExchange.java:581) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.MultiExchange.getExceptionalCF(MultiExchange.java:527) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.MultiExchange.lambda$responseAsyncImpl$7(MultiExchange.java:447) ~[java.net.http:?]
at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934) ~[?:?]
at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:911) ~[?:?]
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2162) ~[?:?]
at java.net.http/jdk.internal.net.http.common.SSLFlowDelegate.stopOnError(SSLFlowDelegate.java:983) ~[java.net.http:?]
at java.base/java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:990) ~[?:?]
at java.base/java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:974) ~[?:?]
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2162) ~[?:?]
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper$DownstreamPusher.run1(SubscriberWrapper.java:295) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper$DownstreamPusher.run(SubscriberWrapper.java:259) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$LockingRestartableTask.run(SequentialScheduler.java:205) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:149) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:230) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:303) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:256) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper.errorCommon(SubscriberWrapper.java:419) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SSLFlowDelegate$Reader.errorCommon(SSLFlowDelegate.java:366) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper.onError(SubscriberWrapper.java:410) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.SocketTube$InternalReadPublisher$ReadSubscription.signalCompletion(SocketTube.java:637) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.SocketTube$InternalReadPublisher$InternalReadSubscription.read(SocketTube.java:821) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.SocketTube$SocketFlowTask.run(SocketTube.java:181) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:230) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:303) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:256) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.SocketTube$InternalReadPublisher$InternalReadSubscription.signalError(SocketTube.java:770) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.SocketTube.signalClosed(SocketTube.java:159) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.PlainHttpConnection.close(PlainHttpConnection.java:372) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.AsyncSSLConnection.close(AsyncSSLConnection.java:111) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.Http1Exchange.cancelImpl(Http1Exchange.java:492) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.Http1Exchange.cancel(Http1Exchange.java:427) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.Exchange.cancel(Exchange.java:238) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.MultiExchange.cancel(MultiExchange.java:260) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.ResponseTimerEvent.handle(ResponseTimerEvent.java:71) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.HttpClientImpl.purgeTimeoutsAndReturnNextDeadline(HttpClientImpl.java:1270) ~[java.net.http:?]
at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.run(HttpClientImpl.java:858) ~[java.net.http:?]
This is linked to the new way drops work. And i don't know why there is that leak.
However as a workaround, disabling drops seems to remediate the problem (though you'd get no drops).
Thanks for the fast reply!
I mainly use the miner to farm the drops aswell, I'll just restart it every day for the time being.
I hope you are able to find the leak eventually, but thanks for notifying me about it :)
Is there a way to donate to you for support (if you want/need it ofc)? Because I have used your project for years now and I want to give something back.
Nevermind, found the sponsor button! You can close the ticket
Thanks for the donation ❤️
Regarding the issue itself, we can keep it open to track the memory issue.
The thing is, it was already mentionned on Discord before ; I took a look but didn't find much at the time.
I tried taking a look at it again and pushed some changes in the fix/memory-leak
branch (memory-leak
docker tag).
I ended up changing quite some stuff to land on something maybe stable. One of those is I switched to the latest LTS for Java 21 to benefit from the more recent performance improvments, so it may be a change on the system (jdk to update/install several in parallel).
I managed to let my container running for an hour and seems like the memory isn't slowly growing over time. I'm not really sure if the issue is somewhat patched or if my miner just isn't handling predictions at the time.
I'll let it run more and will try to monitor a bit, but if people want to try this branch early then feel free.
(jar is available here too for a day https://github.com/RakambdaOrg/ChannelPointsMiner/actions/runs/9436821652)
Thanks alot for having a look, I'll try the branch out and let you know the results
The miner has been running over 16 hours, memory usage seems very stable. There will be alot of Rust drops later today for the rest of the week. I will get back to you with the results tomorrow.
It's looking good!
Your changes probably fixed the memory leak. I have the miner running long now, memory seems very stable. I mined 5+ drops, no issues.
Glad to hear that. Seems to behave the same on my end too.
Will try to make a proper release of this soon. Can't be worse than before anyways.
Definitly not, thanks again for looking at it! Looking forward to the new release