Twitter API returning SSL peer shut down incorrectly

restapi

#1

I have an app that retrieves data from Twitter. I am not sure of the exact API call that the app is making but the message returned is “SSL peer shut down incorrectly”. It seems to be happening inconsistently. I can make a request 10 times and it will return data successfully, then the 11th time it returns the error, but then runs successful again. Any ideas what would return this error message?

I am getting 3 error messages using the same account. “SSL peer shut down incorrectly”, “Connection reset” and “Remote host closed connection during handshake”. Any ideas what might be happening here?


#2

Not certain. You’re not able to establish what the app is doing or which endpoints it is calling?

Are you able to give any indication of how frequently (in terms of calls within a period of time) that this occurs?


#3

Here are some of the calls the app is making. Two sets of calls, the last call at the top with the error message that it returns. Calls are made 1 minute apart.

https://api.twitter.com/1.1/statuses/retweets/769557833528541188.json?count=100 -> javax.net.ssl.SSLException: SSL peer shut down incorrectly
https://api.twitter.com/1.1/statuses/retweets/769686213427097600.json?count=100
https://api.twitter.com/1.1/statuses/retweets/769701292977623040.json?count=100
https://api.twitter.com/1.1/statuses/retweets/769746522904924160.json?count=100
https://api.twitter.com/1.1/statuses/retweets/769912838521520128.json?count=100
https://api.twitter.com/1.1/statuses/retweets/770301399859077121.json?count=100
https://api.twitter.com/1.1/statuses/retweets/770671361601732608.json?count=100
https://api.twitter.com/1.1/statuses/retweets/771011086950731776.json?count=100
https://api.twitter.com/1.1/statuses/retweets/771378005381971968.json?count=100
https://api.twitter.com/1.1/statuses/retweets/771743465159987201.json?count=100
https://api.twitter.com/1.1/statuses/retweets/772094583811497984.json?count=100
https://api.twitter.com/1.1/statuses/retweets/772222924212363264.json?count=100
https://api.twitter.com/1.1/statuses/retweets/772238019940249600.json?count=100
https://api.twitter.com/1.1/statuses/retweets/772283237083193344.json?count=100
https://api.twitter.com/1.1/statuses/retweets/772449592180867072.json?count=100
https://api.twitter.com/1.1/statuses/retweets/773278879435919361.json?count=100
https://api.twitter.com/1.1/statuses/retweets/773551912989888512.json?count=100
https://api.twitter.com/1.1/statuses/retweets/773921682209775621.json?count=100
https://api.twitter.com/1.1/statuses/retweets/774008266095558657.json?count=100
https://api.twitter.com/1.1/statuses/retweets/774299166507995137.json?count=100
https://api.twitter.com/1.1/statuses/retweets/774631301278294016.json?count=100
https://api.twitter.com/1.1/statuses/retweets_of_me.json?count=100


Calling API: https://api.twitter.com/1.1/statuses/retweets/751174411001135104.json -> java.net.SocketException: Connection reset
Calling API: https://api.twitter.com/1.1/statuses/retweets/751203942651064320.json
Calling API: https://api.twitter.com/1.1/statuses/retweets/751215501481799680.json
Calling API: https://api.twitter.com/1.1/statuses/retweets/751219498452193280.json
Calling API: https://api.twitter.com/1.1/statuses/retweets/751233995203940352.json
Calling API: https://api.twitter.com/1.1/statuses/retweets/751234296740917250.json
Calling API: https://api.twitter.com/1.1/statuses/retweets/751235506743103488.json
Calling API: https://api.twitter.com/1.1/statuses/retweets/751235769038098436.json
Calling API: https://api.twitter.com/1.1/statuses/retweets/751235948084535296.json
Calling API: https://api.twitter.com/1.1/statuses/retweets/751236886660648960.json
Calling API: https://api.twitter.com/1.1/statuses/retweets/751237305709441024.json
Calling API: https://api.twitter.com/1.1/statuses/retweets/751237923584958464.json
Calling API: https://api.twitter.com/1.1/statuses/retweets/751238838568165376.json
Calling API: https://api.twitter.com/1.1/statuses/retweets/751239040402284544.json
Calling API: https://api.twitter.com/1.1/statuses/retweets/751239467424292864.json
Calling API: https://api.twitter.com/1.1/statuses/retweets/751239608373948416.json
Calling API: https://api.twitter.com/1.1/statuses/retweets/751240344461676544.json
Calling API: https://api.twitter.com/1.1/statuses/retweets/751240636427231232.json
Calling API: https://api.twitter.com/1.1/statuses/retweets/751241720197558272.json
Calling API: https://api.twitter.com/1.1/statuses/retweets/751242212524961793.json
Calling API: https://api.twitter.com/1.1/statuses/retweets/751243919933845504.json
…130 calls prior.


Both of these Exceptions (SSL Peer shutdown incorrectly & Connection reset) seem to be a connection issue from the twitter server.


#4

This set of calls is made once a day. We seem to be seeing one of these errors roughly every other day.