2012-01-06 8 views
6

Sto ricevendo il seguente avviso quando la mia applicazione Akka 1.2 basata cerca di lavorare con più di 500 o giù di lì nodi della griglia:Akka avvertenza di "troppi casi HashedWheelTimer"

Jan 05, 2012 1:36:43 PM org.jboss.netty.util.internal.SharedResourceMisuseDetector 
WARNING: You are creating too many HashedWheelTimer instances. 
HashedWheelTimer is a shared resource that must be reused across the application, so that only a few instances are created. 

ho intenzione di scavare più a fondo nel codice Akka per scoprire dove viene utilizzato HashedWheelTimer e cosa dovrei fare per evitare troppi di quelli creati. Mentre lo sto facendo, ho pensato di postare l'avviso nel caso uno degli esperti potesse darmi un puntatore o due che potrebbero restringere e accelerare la mia ricerca, per favore?

Utilizzando Akka 1.3-RC6, sto ottenendo la seguente eccezione:

Jan 12, 2012 1:24:38 PM org.jboss.netty.util.HashedWheelTimer 
WARNING: An exception was thrown by TimerTask. 
org.jboss.netty.channel.ChannelException: Failed to open a socket. 
    at org.jboss.netty.channel.socket.nio.NioClientSocketChannel.newSocket(NioClientSocketChannel.java:49) 
    at org.jboss.netty.channel.socket.nio.NioClientSocketChannel.<init>(NioClientSocketChannel.java:83) 
    at org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.newChannel(NioClientSocketChannelFactory.java:139) 
    at org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.newChannel(NioClientSocketChannelFactory.java:86) 
    at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:218) 
    at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:188) 
    at akka.remote.netty.ActiveRemoteClient.connect(NettyRemoteSupport.scala:470) 
    at akka.remote.netty.ActiveRemoteClientHandler$$anonfun$channelClosed$1$$anon$4.run(NettyRemoteSupport.scala:599) 
    at org.jboss.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:519) 
    at org.jboss.netty.util.HashedWheelTimer$Worker.notifyExpiredTimeouts(HashedWheelTimer.java:440) 
    at org.jboss.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:379) 
    at java.lang.Thread.run(Thread.java:722) 
Caused by: java.net.SocketException: Too many open files 
    at sun.nio.ch.Net.socket0(Native Method) 
    at sun.nio.ch.Net.socket(Net.java:323) 
    at sun.nio.ch.Net.socket(Net.java:316) 
    at sun.nio.ch.SocketChannelImpl.<init>(SocketChannelImpl.java:101) 
    at sun.nio.ch.SelectorProviderImpl.openSocketChannel(SelectorProviderImpl.java:60) 
    at java.nio.channels.SocketChannel.open(SocketChannel.java:142) 
    at org.jboss.netty.channel.socket.nio.NioClientSocketChannel.newSocket(NioClientSocketChannel.java:47) 
    ... 11 more 
+0

Grazie Dan, mi hai battuto per la modifica ... –

+0

La mia sfera di cristallo non è in grado di determinare quale versione di Akka stai correndo. –

+0

Le mie scuse; Ho modificato il post per riflettere sul fatto che sto usando Akka 1.2. –

risposta

5

è stato risolto in Akka 2.0-M1, ora ho backport la correzione a 1,3 e sarà nel prossimo RC.

+0

Proverà 1.3 e ti informerà se questo risolve il problema. Grazie Viktor; passa un buon fine settimana. –

+0

Penso di aver risolto il problema e di aver ripristinato la correzione. Sarà nel prossimo RC di 1.3 –

+0

Bello; grazie Viktor! Lo scaricherò e lo testerò appena sarà rilasciato e ti faccio sapere se questo risolve il problema sulla mia parte ... Grazie! :-) –