You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our service located at BeiJing, China. The version of pusy is 0.9.2. I other encounter such Exception of "com.relayrides.pushy.apns.ClientNotConnectedException: Client disconnected unexpectedly" when sending a lot of notifications. We do not hope that our service to wait for reconnecting too much time, so I use 5 pushy clients to send notifications. If it is failed that one client sends a notification, we use another pushy client(isConnected() == true) to sent the notification again at once.
However, the solution is not good yet. It is easy that we encounter that all pushy are invalid.
Could you give me some suggestions to avoid encountering too many such exceptions, please? Or could you tell us some better usages to efficiently use pushy client?
The Exception is as following:
APNs client pipeline caught an exception.
java.io.IOException: Connection timed out
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:192)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)
at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288)
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1100)
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:366)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:118)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:651)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:574)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:488)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:450)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:873)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
at java.lang.Thread.run(Thread.java:745)
DEBUG : 2017-04-01 15:56:26 (nioEventLoopGroup-8-1) - com.relayrides.pushy.apns.ApnsClient
Disconnected. Next automatic reconnection attempt in 1 seconds.
ERROR : 2017-04-01 15:56:26 (nioEventLoopGroup-8-1) - com.xinge.push.manager.PushyApnsListener
failed to send Notification: 142276
ERROR : 2017-04-01 15:56:26 (nioEventLoopGroup-8-1) - com.xinge.push.manager.ResponseResultListener
Failed to send push notification using the APNs Clinet[4]
java.util.concurrent.ExecutionException: com.relayrides.pushy.apns.ClientNotConnectedException: Client disconnected unexpectedly.
at io.netty.util.concurrent.AbstractFuture.get(AbstractFuture.java:41)
at com.xinge.push.manager.ResponseResultListener.operationComplete(ResponseResultListener.java:34)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:514)
at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:507)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:486)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:427)
at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:129)
at com.relayrides.pushy.apns.ApnsClient$3$2.run(ApnsClient.java:514)
at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38)
at io.netty.util.concurrent.PromiseTask.run(PromiseTask.java:73)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:418)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:454)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:873)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.relayrides.pushy.apns.ClientNotConnectedException: Client disconnected unexpectedly.
... 9 more
Regards,
Chason
The text was updated successfully, but these errors were encountered:
Hi,
Our service located at BeiJing, China. The version of pusy is 0.9.2. I other encounter such Exception of "com.relayrides.pushy.apns.ClientNotConnectedException: Client disconnected unexpectedly" when sending a lot of notifications. We do not hope that our service to wait for reconnecting too much time, so I use 5 pushy clients to send notifications. If it is failed that one client sends a notification, we use another pushy client(isConnected() == true) to sent the notification again at once.
However, the solution is not good yet. It is easy that we encounter that all pushy are invalid.
Could you give me some suggestions to avoid encountering too many such exceptions, please? Or could you tell us some better usages to efficiently use pushy client?
The Exception is as following:
Regards,
Chason
The text was updated successfully, but these errors were encountered: