scotchadmins / javapns

Automatically exported from code.google.com/p/javapns
0 stars 0 forks source link

OutOfMemoryError when remote host closed connection #144

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I get OutOfMemoryError exceptions when the apple push server is not reachable.

If apple is reachable everything works.

Any ideas?

2012-09-17 22:51:54,763 INFO : javapns.notification.PushNotificationManager - 
Attempt failed (Remote host closed connection during handshake)... trying again
2012-09-17 22:51:58,590 INFO : javapns.notification.PushNotificationManager - 
Attempt failed (Remote host closed connection during handshake)... trying again
2012-09-17 22:51:58,591 INFO : javapns.notification.PushNotificationManager - 
Attempt failed (Remote host closed connection during handshake)... trying again
2012-09-17 22:52:00,908 INFO : javapns.notification.PushNotificationManager - 
Attempt failed (Remote host closed connection during handshake)... trying again
2012-09-17 22:52:00,908 INFO : javapns.notification.PushNotificationManager - 
Attempt failed (Remote host closed connection during handshake)... trying again
2012-09-17 22:52:00,908 INFO : javapns.notification.PushNotificationManager - 
Attempt failed (Remote host closed connection during handshake)... trying again
2012-09-17 22:52:53,555 INFO : javapns.notification.PushNotificationManager - 
Attempt failed (Remote host closed connection during handshake)... trying again
2012-09-17 22:52:55,789 INFO : javapns.notification.PushNotificationManager - 
Attempt failed (Remote host closed connection during handshake)... trying again
2012-09-17 22:53:00,311 INFO : javapns.notification.PushNotificationManager - 
Attempt failed (Remote host closed connection during handshake)... trying again
2012-09-17 22:53:11,883 INFO : javapns.notification.PushNotificationManager - 
Attempt failed (Remote host closed connection during handshake)... trying again
2012-09-17 22:54:08,263 INFO : javapns.notification.PushNotificationManager - 
Attempt failed (Remote host closed connection during handshake)... trying again
2012-09-17 22:54:25,541 INFO : javapns.notification.PushNotificationManager - 
Attempt failed (Remote host closed connection during handshake)... trying again
2012-09-17 22:54:32,390 INFO : javapns.notification.PushNotificationManager - 
Attempt failed (Remote host closed connection during handshake)... trying again
2012-09-17 22:54:50,758 INFO : javapns.notification.PushNotificationManager - 
Attempt failed (Remote host closed connection during handshake)... trying again
2012-09-17 22:55:03,120 ERROR: javapns.notification.PushNotificationManager - 
Attempt to send Notification failed and beyond the maximum number of attempts 
permitted
2012-09-17 22:55:10,197 ERROR: javapns.notification.PushNotificationManager - 
Attempt to send Notification failed and beyond the maximum number of attempts 
permitted
2012-09-17 22:55:20,035 INFO : javapns.notification.PushNotificationManager - 
Attempt failed (Remote host closed connection during handshake)... trying again
2012-09-17 22:57:20,157 INFO : javapns.notification.PushNotificationManager - 
Attempt failed (Remote host closed connection during handshake)... trying again
Exception in thread "JavaPNS grouped notification thread in LIST mode" 
java.lang.OutOfMemoryError: Java heap space
2012-09-17 22:58:15,277 ERROR: javapns.notification.PushNotificationManager - 
Attempt to send Notification failed and beyond the maximum number of attempts 
permitted
2012-09-17 22:58:17,485 INFO : javapns.notification.PushNotificationManager - 
Attempt failed (Remote host closed connection during handshake)... trying again
Exception in thread "JavaPNS grouped notification thread in LIST mode" 
java.lang.OutOfMemoryError: Java heap space
    at sun.security.ssl.InputRecord.<init>(InputRecord.java:84)
    at sun.security.ssl.AppInputStream.<init>(AppInputStream.java:50)
    at sun.security.ssl.SSLSocketImpl.init(SSLSocketImpl.java:552)
    at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:383)
    at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:90)
    at javapns.communication.ConnectionToAppleServer.getSSLSocket(ConnectionToAppleServer.java:155)
    at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:440)
    at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:350)
    at javapns.notification.transmission.NotificationThread.runList(NotificationThread.java:230)
    at javapns.notification.transmission.NotificationThread.run(NotificationThread.java:201)
    at java.lang.Thread.run(Thread.java:679)

Original issue reported on code.google.com by m...@felixschulze.de on 18 Sep 2012 at 7:33

GoogleCodeExporter commented 8 years ago
How much memory have you allocated to your program?  And for how long was the 
thread running before it threw an OutOfMemoryError?

It could be related to issue #120... 

Original comment by sype...@gmail.com on 22 Sep 2012 at 1:52

GoogleCodeExporter commented 8 years ago
1024MB.
Runs about 3 hours (the complete application)

Original comment by m...@felixschulze.de on 22 Sep 2012 at 6:37