These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
123Next page
 

IMPORTANT NOTICE: We have started banning IPs again!

First post First post
Author
CCP Prism X
C C P
C C P Alliance
#1 - 2013-02-01 10:56:04 UTC  |  Edited by: CCP Prism X
Morning developers,

As of late we've noticed a stark rise in exceptions being thrown from the API due to user input. This has lead to a degradation in the service level of the application, affecting all users regardless of wether they are actually causing exceptions or not.

In light of this I find it appropriate to remind you that:

  • The API is not here for you to scrape all character information into your private database. This is considered abuse of the service.
  • We raise errors on user input so you can amend your code. It is your responsibility to react to them and amend code.


We have web developers currently assigned to review the application code and making error handling more graceful to improve the experience of all users. This does not mean you can stop caring about your code and how it interacts with our service.

As that will take some time we have also reinstated exception blocking. If you raise too many exceptions over a certain period of time, your IP will be added to an application side block-list. Any call made by such an IP will result in an immediate exception (yeah.. I know) with the exception code: 904. Your application will be blocked until the cachedUntil "timer" of the response is up.

If you continue to raise errors while you are banned you will most likely get banned on the IIS level to reduce the amount of exceptions thrown by the application. We have just now put 13 distinct IP addresses on the IIS level "block list". All these IP Addresses were raising fifty or more 904 errors, on average, per minute.

We apologize for any inconvenience this will cause but this is the only way we can enforce code quality on code that we have no access to or control over.
Tazuki Falorn
Eighty Joule Brewery
Goonswarm Federation
#2 - 2013-02-01 12:48:56 UTC  |  Edited by: Tazuki Falorn
A little warning about this might have been nice. I got some pings on Jabber about API pulls not happening, checked the worker process and it's upset about 403s. Well, it's actually upset about getting a bunch of 500s in between 403s but that's about par for the course. The errors I see with any frequency are:

* Herp derp the API server has decided this perfectly valid request is invalid, have a 24 hour cache timer. This is always honoured, even though I can run the exact same call a few minutes later and it's valid again.
* 500 Internal server error or the server exploding, 5/10/20/40s delays are added in between requests.
* Trying to be nice about using /char/Locations I bulk all updates into a single request. This often fails even if it's called literally seconds after retrieving /char/Assets because who the hell knows.
* Occasional (like a few per day at most) permanent errors when keys expire/are deleted/etc. The key is disabled immediately and no new jobs are triggered for it.

All cachedUntil timers are always honoured, I'm not really sure what else I'm meant to do to be a 'good API citizen'. I am not scraping the API and I try to handle the ridiculous error situation gracefully :(


Edit: oh btw, /corp/OutpostList flat out doesn't work for any key ever.
CCP Prism X
C C P
C C P Alliance
#3 - 2013-02-01 13:21:06 UTC
Just for the record, this IP banning schema was instated a long time ago. We do not always enforce it because it takes resources but we clearly reserve the right to when a few applications are degrading the QoS for all.

I can't say whether you are being a "bad developer" or wether you are suffering from the reduction of QoS with these errors you reference. You should see it in your error logs, hopefully with tracebacks to what calls are causing them if you're seeing them in the first place.

If not, then you do not have to worry. Blink
Peter Powers
Terrorists of Dimensions
#4 - 2013-02-01 13:23:26 UTC
Tazuki Falorn wrote:
A little warning about this might have been nice.


exactly how much warning time do you need?
this was introduced more than 1 1/2 years ago:

http://community.eveonline.com/devblog.asp?a=blog&bid=924

and if someone is not even reacting on the code that sais "dude your doing it wrong, and your temp blocked for it, change or it will go perma" (yes i paraphrased it), then actually he deserves the permanent ban =)

3rdPartyEve.net - your catalogue for 3rd party applications

Tazuki Falorn
Eighty Joule Brewery
Goonswarm Federation
#5 - 2013-02-01 14:26:22 UTC
Peter Powers wrote:
exactly how much warning time do you need?
this was introduced more than 1 1/2 years ago:

http://community.eveonline.com/devblog.asp?a=blog&bid=924


I wasn't attempting to develop against the EVE API at that point so I probably completely skipped over the dev blog... and then I apparently used http://wiki.eveonline.com/en/wiki/EVE_API_EVE_Error_List as a source for errors that needed specific handling, thinking "it's on the official wiki, surely it's up to date". Turns out it wasn't (and isn't) and I should have checked the API call directly, derp Ugh I'll add some code to handle this properly when it's not 1am, most humble apologies etc.
Joe Skellington
Sarz'na Khumatari
#6 - 2013-02-01 14:30:11 UTC
Ooops

Please note that ASCII art is not permitted in the forum signatures. Spitfire

Squizz Caphinator
The Wormhole Police
#7 - 2013-02-01 14:35:17 UTC  |  Edited by: Squizz Caphinator
CCP Prism X wrote:
The API is not here for you to scrape all character information into your private database. This is considered abuse of the service.


Is this directed to my website, EveWho? I go through great pains to make sure I don't generate errors.

Various projects I enjoy putting my free time into:

https://zkillboard.com | https://evewho.com

Karbowiak
Sacred Templars
Fraternity.
#8 - 2013-02-01 15:05:47 UTC  |  Edited by: Karbowiak
The whole "helping the enablers" doesn't seem to be the highest priority, seeing as high profile sites such as EVEWho, EVE-KILL and most likely Battleclinic got banned, ditto for alliances such as Goonswarm and it seems TEST too.

The main problem isn't that the API is getting hammered, it's that it's coded in a way, that doesn't return data that has been cached.

Best example of this is the killlog.
If EVE-KILL accesses a killlog belonging to a key, noone (not even eve-kill) can access that killlog for that character, before the cachedUntil value is over. And if anyone does it, they get an error 119 thrown at them. Which incidentally also counts as an error.

Now if you make several thousand of those a day (Which EVE-KILL does) you're apparently screwed now.
And the best part? you have no idea if you'll make a 119 or not.

On another note, if CCP were to allow us to pay say 100$ a month for privileged access to the API server, or let us buy a server and place at them, we'd do it.
CCP Prism X
C C P
C C P Alliance
#9 - 2013-02-01 15:29:28 UTC
Karb, you know I'm aware of of this and have been meaning to find free time to amend the kill log calls. You also know that there are no resources to go into, or all the other technical issues, that so we're trying to do what we can to keep the service usable for as many as possible. And I do hope you understand this is nothing personal against you and Squizzy. I'm actually talking to him right now and trying to sort this out for the weekend.

And seeing as the weekend is coming up I'll losen up the restrictions a bit and request the unban all but the worst offenders. We have a meeting next Monday on proper actionables we can take to fix things so *hopefully* we'll be up and running again soon.
Kari Juptris
Dreddit
Test Alliance Please Ignore
#10 - 2013-02-01 15:53:56 UTC
:v
Krazynikomo
Perkone
Caldari State
#11 - 2013-02-01 16:05:21 UTC  |  Edited by: Krazynikomo
I'm going to assume that the current API will never really be properly worked on, due to CREST release coming closer and closer (whenever that does finally happen).

I just hope that day is soon.

Oh well, at least we're getting a good laugh out of this. It's not a completely bad day, I managed to find out that Fozzie's favorite SNSD member is Sunny.
Solo Drakban
Goosefleet
Gooseflock Featheration
#12 - 2013-02-01 18:40:14 UTC  |  Edited by: Solo Drakban
CCP Prism X wrote:
appropriate to remind you that:

  • We raise errors on user input so you can amend your code. It is your responsibility to react to them and amend code.


We have web developers currently assigned to review the application code and making error handling more graceful to improve the experience of all users. This does not mean you can stop caring about your code and how it interacts with our service.

As that will take some time we have also reinstated exception blocking. If you raise too many exceptions over a certain period of time, your IP will be added to an application side block-list. Any call made by such an IP will result in an immediate exception (yeah.. I know) with the exception code: 904. Your application will be blocked until the cachedUntil "timer" of the response is up.

If you continue to raise errors while you are banned you will most likely get banned on the IIS level to reduce the amount of exceptions thrown by the application. We have just now put 13 distinct IP addresses on the IIS level "block list". All these IP Addresses were raising fifty or more 904 errors, on average, per minute.


Then can you please start being more consistent with your errors? I basically have to treat 211 errors as advisory at this point and just back off a little, because this error seems to be thrown at random, regardless of the actual state of the account. I've had entire swaths of vCodes return 210 errors, and I stop and invalidate the key and stop using it, but if you use the exact same vCode later, it works just fine, resulting in logic like "less than X 210 errors per run and it's probably safe to invalidate them, greater than X 210 errors per run and it's :ccp: and just abort the run and wait an hour."

I don't want to end up getting throttled because of exceptions being tossed that I'm not actually responsible for generating. I try and do everything else according to the accepted rules. I scrub vCodes (both when I collect them and during polling), I honour CachedUntil, I delay between requests, making sure I'm not crushing the API server, etc. Maybe CCP should consider setting up feedback loops with developers of well-used community tools (ala EVEWho and EVE-Kill) or those who use the API to manage large blocs (IE, TEST, Goonswarm, PL, etc) so that IPs registered to these entities won't just be blindly nuked, but somebody can send out an email asking WTF and sorting out what may be the underlying issue (CCP backend, utility backend, etc) rather than suddenly tools suddenly ceasing to function.

Anyways, just my $0.02. I'm now going to go off and implement a 904 kill switch so that if at any time, any API polling system within the GSF encounters a 904 it'll raise a flag and immediately terminate all current and future polling until the cachedUntil timer expires.


Edit: WTF? My entire post vanished and replaced by a quote I mostly deleted? Excellent. Forums are hard to develop.
Marcel Devereux
Aideron Robotics
Aideron Robotics.
#13 - 2013-02-01 18:47:44 UTC
Do the errors for requesting the FW feeds count for banning? The only way to find out of a character is in FW is to request that feed, which generates a error. If this does count for banning, how about you add the factionID to the character info, characters sheet, and corporation sheet feeds?
Cyerus
University of Caille
Gallente Federation
#14 - 2013-02-01 18:50:11 UTC  |  Edited by: Cyerus
Solo Drakban wrote:
Edit: WTF? My entire post vanished and replaced by a quote I mostly deleted? Excellent. Forums are hard to develop.

Don't blame the forums for your own stupidity.
Pages have a timeout, SSL pages an even shorter timeout.
If you take to long to type your post and post it, your browser needs to reacquire the SSL connection losing your POST data in the process.

Type it in notepad (or whatever) next time, and copy/pasta.


Marcel Devereux wrote:
Do the errors for requesting the FW feeds count for banning? The only way to find out of a character is in FW is to request that feed, which generates a error. If this does count for banning, how about you add the factionID to the character info, characters sheet, and corporation sheet feeds?

I'm interested in the FW part aswell. My forummod uses that to verify if an user is part of FW, always throwing a certain error.
Would be weird if this could lead to a ban, as it's a clear design flaw on CCPs own side.
Solo Drakban
Goosefleet
Gooseflock Featheration
#15 - 2013-02-01 18:52:02 UTC
Cyerus wrote:
Solo Drakban wrote:
Edit: WTF? My entire post vanished and replaced by a quote I mostly deleted? Excellent. Forums are hard to develop.


Don't blame the forums for your own stupidity.
Pages have a timeout, SSL pages an even shorter timeout.
If you take to long to type your post and post it, your browser needs to reacquire the SSL connection losing your POST data in the process.

Type it in notepad (or whatever) next time, and copy/pasta.



See, there are literally tens thousands of fourms and other form based input systems running behind SSL that don't have this issue (like the entire GSF infrastructure which is 100% HTTPS), but yes, indeed, it's my fault, I shouldn't expect to be able to type into a form for a few minutes, do some research, tweak the post and hit the button and expect it to work. What was I thinking?
Karbowiak
Sacred Templars
Fraternity.
#16 - 2013-02-01 19:07:12 UTC  |  Edited by: Karbowiak
Solo Drakban wrote:

Edit: WTF? My entire post vanished and replaced by a quote I mostly deleted? Excellent. Forums are hard to develop.


No worries, it did the same to mine, three times. Thank god chrome allows you to go back and get the text you just tried to post.

And i wholly agree with you, the fact we get random errors thrown at us, for something that shouldn't even produce an error, coupled with the caching issues, is just ridiculous.

Doesn't take 5 minutes to hack together some code that stores a cached result from the backend, and serves it till a timer runs out. Ugh
Two step
Aperture Harmonics
#17 - 2013-02-01 20:16:34 UTC
This is 100% the wrong way to go about things like this. If you are having problems with some people producing errors, how about approaching it in the following way:

1) Post in advance that you will be starting to ban IPs. This should include *exact* numbers for allowed errors in an exact window of time.
2) Post partial IPs that would currently fall within you ban threshold (leave off the first octet or something)
3) After a week or so, *then* turn on the bans.

If CCP wants to actually be encouraging your large 3rd party developer community, you guys need to be a little more respectful of us, and you need to give us advance notice of any *non-critcal* changes.

CSM 7 Secretary CSM 6 Alternate Delegate @two_step_eve on Twitter My Blog

Louis Vitton
Viziam
Amarr Empire
#18 - 2013-02-01 23:31:42 UTC
Quote:
After a week or so, *then* turn on the bans.

They said over a year and half ago they will do this.
Wollari
Dirt Nap Squad
#19 - 2013-02-01 23:32:29 UTC
Two step wrote:
1) Post in advance that you will be starting to ban IPs. This should include *exact* numbers for allowed errors in an exact window of time.

1.5 years ago they announced it but did not enforced it.

Two step wrote:
2) Post partial IPs that would currently fall within you ban threshold (leave off the first octet or something)
3) After a week or so, *then* turn on the bans.

Are you doing the same in eve? Ask first then shoot or "shoot blues and tell vile rat (RIP) about it" :-)

It's hard to say we're gonna block your IP in a week when the API servers can't breath.

But yes CCP should not abandong the API and the people taking care of ... this will just result in API stuff affecting the DB in a bad way and the community (when they broke stuff again) ... they've so many small things that could/should be fixed. Russian characters that make XML invalid, inconsistens calls and errors (killog), etc. etc. etc ...

If the API would get some love, we (developer) didn't have to go around limiations, errors and concentrate more and reacting on error codes, etc.

DOTLAN EveMaps | Your out-of-game map, navigation toolset, sov database, etc. since 2008

Solo Drakban
Goosefleet
Gooseflock Featheration
#20 - 2013-02-02 06:40:52 UTC
Wollari wrote:
Russian characters that make XML invalid


Can you post an example of this? I don't think I've ever run into this and given the number of Russian corps in our alliance, that's rather surprising.

123Next page