Getting Premature EOF error

  • 4
  • Problem
  • Updated 4 years ago
  • Solved
Hello,

When i make call to below URL

http://api.wunderground.com/api/25789...

Sometime i get `Caused by: java.io.IOException: Premature EOF` exception.

Please guide me, how to resolve this and what is cause?

Thanks,
Hiren
Photo of hiroRocking

hiroRocking

  • 1 Post
  • 0 Reply Likes

Posted 4 years ago

  • 4
Photo of ervandew

ervandew

  • 8 Posts
  • 0 Reply Likes
We are encountering what I believe is the same issue with our python app when reading forecast and historic readings:

IncompleteRead: IncompleteRead(3908 bytes read)

I first noticed these errors in our logs yesterday.
Photo of Tim Roche

Tim Roche, Official Rep

  • 305 Posts
  • 27 Reply Likes
I just tried your key and you are exceeding your maximum rate. 

You might want to implement some sort of rate limiting on your app, and sign up for a higher usage tier

Also, we provide an error object you can check when you are not getting a full result back for some reason.
Photo of ervandew

ervandew

  • 8 Posts
  • 0 Reply Likes
Tim,

We may very well be exceeding our rate limit on our forecast calls as well (been waiting on our business side to get us bumped up), but when that occurred we got a complete json response including a descriptive error, so perhaps there is a regression on your side under this condition? Regarding our historic calls though, we shouldn't be exceeding our api limits since our code limits itself and we deffinetly have raindrops available.
Photo of Tim Roche

Tim Roche, Official Rep

  • 305 Posts
  • 27 Reply Likes
Hi,
if you click on the link you provided me, you will see this message
  • description: "this key is not valid due to exceeding rate plan"
Photo of ervandew

ervandew

  • 8 Posts
  • 0 Reply Likes
Tim,

Perhaps you are confusing me with the original author. I didn't provide a link since I don't want to expose our api key here. The orginal author could very well be exceeding their rate plan due to posting their key here.
Photo of Tim Roche

Tim Roche, Official Rep

  • 305 Posts
  • 27 Reply Likes
You're right,  Apologies

Could you send me a specific url that is causing the issue?
Photo of Tom

Tom

  • 1 Post
  • 0 Reply Likes
We are seeing this as well and when I use the URL provided by the original poster but replace his key with ours, I don't see a Rate Plan Exceeded message, I get a proper response. We call out to the API (forecast and conditions queries) regularly and have been doing so for a couple of years. This is the first time I've seen this specific error. If it helps, I've seen 4 total starting 20 hours ago. The last 3 have been within the past half hour (26, 21 and 20 minutes ago). I'm using Python and urllib2 to make the calls.
Photo of ervandew

ervandew

  • 8 Posts
  • 0 Reply Likes
I'm able to successful hit these urls now using our api key, but just a couple hours ago they both triggered the IncompleteRead error I described above:

http://api.wunderground.com/api/_key_...
http://api.wunderground.com/api/_key_...
Photo of Olsonmobile

Olsonmobile

  • 4 Posts
  • 0 Reply Likes
Hi Everyone,

We are also suddenly seeing this error. Yesterday we saw no such error, just started noticing it today.

It is a strange one, similar to what was mentioned above, we don't always get this EOF error, but only intermittently. It could be happening after a series of rapid hits to the wunderground API, ranging from 6 to 12 requests, every 5 seconds or so. But no definite pattern.

Has something changed on the wunderground API rate limits or thresholds? Some help on this would be much appreciated.
Photo of cigumo

cigumo

  • 1 Post
  • 0 Reply Likes
I'm having this problem too. It started today (Aug 6, around 3PM GMT) and it's still happening. It is random. Some times all the queries fail, bust most of the time from 3 queries, 1 fails.

I'm far from reaching both the calls per minute and calls per day limit, so that's not it.

The error I get is - IncompleteRead(2538 bytes read).

I've been using the exact same application for over two years, and I have not changed anything, so it does not seem to be from my side.

Thank you.
Photo of John Belmonte

John Belmonte

  • 18 Posts
  • 1 Reply Like
I was seeing a similar situation in my C# web application. I found a solution online that worked for me. Using the HttpWebRequest class object objRequest, add the following:

objRequest.KeepAlive = false;
objRequest.ProtocolVersion = HttpVersion.Version10;

I think it is the KeepAlive setting that matters, but since the two settings together worked for me, I just went with them. As soon as I implemented this modification, all my errors stopped.
Photo of Tim Roche

Tim Roche, Official Rep

  • 305 Posts
  • 27 Reply Likes
We believe this was a transient error on our end that has been resolved.  Thanks you all for the feedback
Photo of ervandew

ervandew

  • 8 Posts
  • 0 Reply Likes
Thanks Tim!

I haven't seen an error in our logs since 2014-08-07 23:09:31 UTC... so far so good.
Photo of Olsonmobile

Olsonmobile

  • 4 Posts
  • 0 Reply Likes
Looking good from our end now as well. Thank you for the updates.