Hmm, this could be caused by a high number of unconfirmed transactions in 
the mempool of your bitcoind right now, plus your node not responding 
quickly. For whatever reason, bitcoinj has a hard limit of pending requests 
for transactions set at 100.

Questions: Is your PeerGroup connected to a Wallet? Do you have bloom 
filtering enabled?

As a quick & dirty fix you could raise the 
constant: Peer.PENDING_TX_DOWNLOADS_LIMIT 

On Monday, April 3, 2023 at 3:14:12 PM UTC+2 [email protected] wrote:

> Hi, 
>     bitcoinj(0.16.1) is frequently disconnecting/connecting from the 
> node(own node) by printing the below logs. This is causing high CPU 
> utilization in my app and node. Please help solve the issue.
>
> Logs: 
>
> 2023-04-03 11:38:51.482 INFO 1 --- [ioClientManager] 
> org.bitcoinj.core.Peer : Peer{[10.17.10.81]:8333, version=70016, 
> subVer=/Satoshi:22.0.0/, services=1037 (NETWORK, BLOOM, WITNESS, 
> NETWORK_LIMITED), time=2023-04-03 11:38:44, height=783756}: Too many 
> pending transactions, disconnecting
> 2023-04-03 11:38:51.482  INFO 1 --- [ioClientManager] 
> org.bitcoinj.core.PeerGroup : [10.17.10.81]:8333: Peer died      (0 
> connected, 0 pending, 1 max)
> 2023-04-03 11:38:51.482  INFO 1 --- [ioClientManager] 
> org.bitcoinj.core.PeerGroup: Download peer died. Picking a new one.
> 2023-04-03 11:38:51.482  INFO 1 --- [ioClientManager] 
> org.bitcoinj.core.PeerGroup : Unsetting download peer: 
> Peer{[10.17.10.81]:8333, version=70016, subVer=/Satoshi:22.0.0/, 
> services=1037 (NETWORK, BLOOM, WITNESS, NETWORK_LIMITED), time=2023-04-03 
> 11:38:44, height=783756
> 2023-04-03 11:38:51.482 INFO 1 --- [eerGroup Thread] 
> org.bitcoinj.core.PeerGroup: Peer discovery took 296.0 ns and returned 0 
> items from 0 discoverers
> 2023-04-03 11:38:51.482  INFO 1 --- [eerGroup Thread] 
> org.bitcoinj.core.PeerGroup: Waiting 1500 ms before next connect attempt to 
> [10.17.10.81]:8333
> 2023-04-03 11:38:52.983  INFO 1 --- [ioClientManager] 
> org.bitcoinj.core.Peer: Announcing to btc-node.prod.local/10.17.10.81:8333 
> as: /bitcoinj:0.16.1/
>
> and then again disconnects and logs repeat. Transactions are downloaded 
> correctly but continuous disruptions are causing high CPU usage. Please 
> help to solve the issue. Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"bitcoinj" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bitcoinj/714ac81c-ee4c-48fd-b6a2-fc5752f27028n%40googlegroups.com.

Reply via email to