Error while running bitcoinj code

77 views
Skip to first unread message

Ajit Soman

unread,
Dec 13, 2017, 7:52:39 AM12/13/17
to bitcoinj

I am running my bitcoinj  code i am getting this logs . I am unable to understand exact cause of the below logs. Since i have 16GB of RAM out of which 4 GB is consumed.


2017-12-13 12:25:40.669  WARN 1950 --- [ioClientManager] org.bitcoinj.utils.Threading$UserThread  : User thread has 10000 pending tasks, memory exhaustion may occur.
If you see this message, check your memory consumption and see if it's problematic or excessively spikey.
If it is, check for deadlocked or slow event handlers. If it isn'
t, try adjusting the constant
Threading.UserThread.WARNING_THRESHOLD upwards until it's a suitable level for your app, or Integer.MAX_VALUE to disable.



Also when the download block chain reach 94 % . it is not downloading further block chain instead it shows below exception:

2017-12-13 12:28:59.174 WARN 1950 --- [eerGroup Thread] org.bitcoinj.core.PeerGroup : Chain download stalled: received 0.00 KB/sec for 10 seconds, require average of 1.56 KB/sec, disconnecting [127.0.0.1]:8333
 
2017-12-13 12:28:59.175 INFO 1950 --- [eerGroup Thread] org.bitcoinj.core.PeerGroup : [127.0.0.1]:8333: Peer died (0 connected, 0 pending, 1 max)
 
2017-12-13 12:28:59.175 INFO 1950 --- [eerGroup Thread] org.bitcoinj.core.PeerGroup : Download peer died. Picking a new one.
 
2017-12-13 12:28:59.175 INFO 1950 --- [eerGroup Thread] org.bitcoinj.core.PeerGroup : Unsetting download peer: [127.0.0.1]:8333
 
2017-12-13 12:28:59.176 INFO 1950 --- [eerGroup Thread] org.bitcoinj.core.PeerGroup : Peer discovery took 0ms and returned 0 items
 
2017-12-13 12:28:59.176 INFO 1950 --- [eerGroup Thread] org.bitcoinj.core.PeerGroup : Waiting 1500 msec before next connect attempt to [127.0.0.1]:8333
 
2017-12-13 12:28:59.280 WARN 1950 --- [ioClientManager] org.bitcoinj.net.ConnectionHandler : Error handling SelectionKey: java.nio.channels.CancelledKeyException 2017-12-13 12:29:00.676 INFO 1950 --- [eerGroup Thread] org.bitcoinj.core.PeerGroup : Attempting connection to [127.0.0.1]:8333 (0 connected, 1 pending, 1 max)
 
2017-12-13 12:29:00.677 INFO 1950 --- [ioClientManager] org.bitcoinj.net.NioClientManager : Connected to /127.0.0.1:8333
 
2017-12-13 12:29:00.677 INFO 1950 --- [ioClientManager] org.bitcoinj.core.Peer : Announcing to /127.0.0.1:8333 as: /bitcoinj:0.13.6/PeerMonitor:1.0/
 
2017-12-13 12:29:00.678 INFO 1950 --- [ioClientManager] org.bitcoinj.core.Peer : [127.0.0.1]:8333: Got version=70015, subVer='/Satoshi:0.14.1/', services=0x13, time=2017-12-13 12:28:58, blocks=499065
 
2017-12-13 12:29:00.678 INFO 1950 --- [ioClientManager] org.bitcoinj.core.PeerGroup : [127.0.0.1]:8333: New peer (1 connected, 0 pending, 1 max)
 
2017-12-13 12:29:00.678 INFO 1950 --- [ioClientManager] org.bitcoinj.core.PeerGroup : Setting download peer: [127.0.0.1]:8333
 
2017-12-13 12:29:00.678 INFO 1950 --- [ioClientManager] o.bitcoinj.core.DownloadProgressTracker : Chain download switched to [127.0.0.1]:8333
 
2017-12-13 12:29:00.680 INFO 1950 --- [ioClientManager] org.bitcoinj.core.Peer : Received alert from peer [127.0.0.1]:8333: URGENT: Alert key compromised, upgrade required


Andreas Schildbach

unread,
Jan 23, 2018, 11:13:24 AM1/23/18
to bitc...@googlegroups.com
Do you have a wallet connected and how many transactions, inputs and
outputs does it contain (approx.) when the error occurs?


On 12/13/2017 01:52 PM, Ajit Soman wrote:
>
> I am running my bitcoinj  code i am getting this logs . I am unable to
> understand exact cause of the below logs. Since i have 16GB of RAM out
> of which 4 GB is consumed.
>
> |
>
> 2017-12-1312:25:40.669 WARN
> 1950---[ioClientManager]org.bitcoinj.utils.Threading$UserThread :Userthread
> has 10000pending tasks,memory exhaustion may occur.
> Ifyou see thismessage,check your memory consumption andsee ifit's
> problematic or excessively spikey.
> If it is, check for deadlocked or slow event handlers. If it
> isn't,tryadjusting the constant
> Threading.UserThread.WARNING_THRESHOLD upwards untilit's a suitable
> level for your app, or Integer.MAX_VALUE to disable.
> |
>
>
>
> Also when the download block chain reach 94 % . it is not downloading
> further block chain instead it shows below exception:
>
> |
> 2017-12-1312:28:59.174WARN 1950---[eerGroup
> Thread]org.bitcoinj.core.PeerGroup:Chaindownload stalled:received
> 0.00KB/sec for10seconds,requireaverage of 1.56KB/sec,disconnecting
> [127.0.0.1]:8333
>  2017-12-1312:28:59.175INFO 1950---[eerGroup
> --
> 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 bitcoinj+u...@googlegroups.com
> <mailto:bitcoinj+u...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.


Ajit Soman

unread,
Jan 23, 2018, 11:56:45 PM1/23/18
to bitc...@googlegroups.com
I have 520 wallet which i have linked to PeerGroup . 

There are total 2000+ transactions.



> For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to a topic in the Google Groups "bitcoinj" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bitcoinj/e17SRlL-T14/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bitcoinj+unsubscribe@googlegroups.com.

Andreas Schildbach

unread,
Jan 25, 2018, 11:11:36 AM1/25/18
to bitc...@googlegroups.com
Bitcoinj doesn't scale well with multiple wallets. Two or three might be
ok (e.g. to send from one to the other in the same process), but
hundreds will lead to memory exhaustion. Also see

https://bitcoinj.github.io/limitations#bugs-and-other-problems
> <http://bitcoinj.net>.ConnectionHandler:Errorhandling
> >
> SelectionKey:java.nio.channels.CancelledKeyException2017-12-1312:29:00.676INFO
> > 1950---[eerGroup
> Thread]org.bitcoinj.core.PeerGroup:Attemptingconnection
> > to [127.0.0.1]:8333(0connected,1pending,1max)
> >  2017-12-1312:29:00.677INFO
> > 1950---[ioClientManager]org.bitcoinj.net.NioClientManager:Connectedto
> > /127.0.0.1:8333 <http://127.0.0.1:8333>
> >  2017-12-1312:29:00.677INFO
> > 1950---[ioClientManager]org.bitcoinj.core.Peer:Announcingto
> > /127.0.0.1:8333as:/bitcoinj:0.13.6/PeerMonitor:1.0/
> >  2017-12-1312:29:00.678INFO
> >
> 1950---[ioClientManager]org.bitcoinj.core.Peer:[127.0.0.1]:8333:Gotversion=70015,subVer='/Satoshi:0.14.1/',services=0x13,time=2017-12-1312:28:58,blocks=499065
> >  2017-12-1312:29:00.678INFO
> >
> 1950---[ioClientManager]org.bitcoinj.core.PeerGroup:[127.0.0.1]:8333:Newpeer
> > (1connected,0pending,1max)
> >  2017-12-1312:29:00.678INFO
> > 1950---[ioClientManager]org.bitcoinj.core.PeerGroup:Settingdownload
> > peer:[127.0.0.1]:8333
> >  2017-12-1312:29:00.678INFO
> >
> 1950---[ioClientManager]o.bitcoinj.core.DownloadProgressTracker:Chaindownload
> > switched to [127.0.0.1]:8333
> >  2017-12-1312:29:00.680INFO
> > 1950---[ioClientManager]org.bitcoinj.core.Peer:Receivedalert frompeer
> > [127.0.0.1]:8333:URGENT:Alertkey compromised,upgrade required
> > |
> >
> >
> > --
> > 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 bitcoinj+u...@googlegroups.com
> <mailto:bitcoinj%2Bunsu...@googlegroups.com>
> > <mailto:bitcoinj+u...@googlegroups.com
> <mailto:bitcoinj%2Bunsu...@googlegroups.com>>.
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
>
> --
> You received this message because you are subscribed to a topic in
> the Google Groups "bitcoinj" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/bitcoinj/e17SRlL-T14/unsubscribe
> <https://groups.google.com/d/topic/bitcoinj/e17SRlL-T14/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to
> bitcoinj+u...@googlegroups.com
> <mailto:bitcoinj%2Bunsu...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
>
> --
> 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 bitcoinj+u...@googlegroups.com
> <mailto:bitcoinj+u...@googlegroups.com>.
Reply all
Reply to author
Forward
0 new messages