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.
 

WHY YOU SO MEAN SCOTTY

First post
Author
Jack Tronic
borkedLabs
#1 - 2015-05-20 05:09:28 UTC  |  Edited by: Jack Tronic
2015-04-21 00:09:17 --- CRITICAL: Pheal\Exceptions\APIException [ 0 ]: General Error: Scotty the docking manager heard you were talking **** about him behind his back and refuses to service your request. ~ APPPATH\vendor\3rdpartyeve\phealng\lib\Pheal\Core\Result.php [ 95 ] in C:\www\siggy\application\vendor\3rdpartyeve\phealng\lib\Pheal\Pheal.php:294



WHY YOU SO MEAN SCOTTY


~5000 requests a day rejected from a service that hits 1.5k simultaneous users and with two layers of cache timers
CCP FoxFour
C C P
C C P Alliance
#2 - 2015-05-20 08:57:40 UTC
Jack Tronic wrote:
2015-04-21 00:09:17 --- CRITICAL: Pheal\Exceptions\APIException [ 0 ]: General Error: Scotty the docking manager heard you were talking **** about him behind his back and refuses to service your request. ~ APPPATH\vendor\3rdpartyeve\phealng\lib\Pheal\Core\Result.php [ 95 ] in C:\www\siggy\application\vendor\3rdpartyeve\phealng\lib\Pheal\Pheal.php:294



WHY YOU SO MEAN SCOTTY


~5000 requests a day rejected from a service that hits 1.5k simultaneous users and with two layers of cache timers


Any chance of more details?

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.

Jack Tronic
borkedLabs
#3 - 2015-05-20 12:23:45 UTC  |  Edited by: Jack Tronic
CharacterAffialiation API over the last 3-4 months suddenly decided to throw mean scotty at me. It just returns that error in the XML body randomly.

https://gist.github.com/marekr/8bf683dd5590447ffb57

It appears to affect specific character IDs randomly and then go back to working for their IDs.
All the other APIs requests I do appear to be fine at the same time. I don't get back any unusual HTTP status codes nor timeouts.

Generally I query that API to validate an SSO user's corporation because SSO only returns characterID. I revalidate it every so often. while they are actively using the service. Generally it was every 2 hours when the cached expired. I saw the announcement the timer got reduced to 15 minutes and I may be polling more often now (I multiplied timer by 2 previously) and I need to correct back but I've had the issue for months now before the change.


It ends up returning the scotty hates you message for about 5000 requests a day. There are so many requests only because the service is eager to retry to actually get data or else users will have to be blocked from service. Doing security for 3rd parties with EVE is hard.


Is this just the world's most poorly written rate limited error message or something? :/


I'm considering making it email me when an character affiliation API starts failing so I can see if I can observe it from a different IP.
CCP FoxFour
C C P
C C P Alliance
#4 - 2015-05-20 16:30:48 UTC
Jack Tronic wrote:
CharacterAffialiation API over the last 3-4 months suddenly decided to throw mean scotty at me. It just returns that error in the XML body randomly.

https://gist.github.com/marekr/8bf683dd5590447ffb57

It appears to affect specific character IDs randomly and then go back to working for their IDs.
All the other APIs requests I do appear to be fine at the same time. I don't get back any unusual HTTP status codes nor timeouts.

Generally I query that API to validate an SSO user's corporation because SSO only returns characterID. I revalidate it every so often. while they are actively using the service. Generally it was every 2 hours when the cached expired. I saw the announcement the timer got reduced to 15 minutes and I may be polling more often now (I multiplied timer by 2 previously) and I need to correct back but I've had the issue for months now before the change.


It ends up returning the scotty hates you message for about 5000 requests a day. There are so many requests only because the service is eager to retry to actually get data or else users will have to be blocked from service. Doing security for 3rd parties with EVE is hard.


Is this just the world's most poorly written rate limited error message or something? :/


I'm considering making it email me when an character affiliation API starts failing so I can see if I can observe it from a different IP.


That is NOT a rate limit message. Can you post the details of a specific request that failed? Details such as date, time, endpoint, url paramaters, any headers you set such as user-agent, etc. Feel free to EVE Mail me if you don't want to post publicly.

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.

Jack Tronic
borkedLabs
#5 - 2015-05-20 16:57:43 UTC  |  Edited by: Jack Tronic
CCP FoxFour wrote:
Jack Tronic wrote:
CharacterAffialiation API over the last 3-4 months suddenly decided to throw mean scotty at me. It just returns that error in the XML body randomly.

https://gist.github.com/marekr/8bf683dd5590447ffb57

It appears to affect specific character IDs randomly and then go back to working for their IDs.
All the other APIs requests I do appear to be fine at the same time. I don't get back any unusual HTTP status codes nor timeouts.

Generally I query that API to validate an SSO user's corporation because SSO only returns characterID. I revalidate it every so often. while they are actively using the service. Generally it was every 2 hours when the cached expired. I saw the announcement the timer got reduced to 15 minutes and I may be polling more often now (I multiplied timer by 2 previously) and I need to correct back but I've had the issue for months now before the change.


It ends up returning the scotty hates you message for about 5000 requests a day. There are so many requests only because the service is eager to retry to actually get data or else users will have to be blocked from service. Doing security for 3rd parties with EVE is hard.


Is this just the world's most poorly written rate limited error message or something? :/


I'm considering making it email me when an character affiliation API starts failing so I can see if I can observe it from a different IP.


That is NOT a rate limit message. Can you post the details of a specific request that failed? Details such as date, time, endpoint, url paramaters, any headers you set such as user-agent, etc. Feel free to EVE Mail me if you don't want to post publicly.


Hehe, thought so. I'm just super paranoid about rate limits given how much data I shuffle around.


I actually sent you an email at your CCP Games email address on April 22nd after reading that sticky thread on API Errors about this with the subject "[3rd party dev] api errors for siggy". Did you get it?


Otherwise I can evemail you more details.
Jack Tronic
borkedLabs
#6 - 2015-05-20 23:48:01 UTC
CCP FoxFour wrote:
Jack Tronic wrote:
CharacterAffialiation API over the last 3-4 months suddenly decided to throw mean scotty at me. It just returns that error in the XML body randomly.

https://gist.github.com/marekr/8bf683dd5590447ffb57

It appears to affect specific character IDs randomly and then go back to working for their IDs.
All the other APIs requests I do appear to be fine at the same time. I don't get back any unusual HTTP status codes nor timeouts.

Generally I query that API to validate an SSO user's corporation because SSO only returns characterID. I revalidate it every so often. while they are actively using the service. Generally it was every 2 hours when the cached expired. I saw the announcement the timer got reduced to 15 minutes and I may be polling more often now (I multiplied timer by 2 previously) and I need to correct back but I've had the issue for months now before the change.


It ends up returning the scotty hates you message for about 5000 requests a day. There are so many requests only because the service is eager to retry to actually get data or else users will have to be blocked from service. Doing security for 3rd parties with EVE is hard.


Is this just the world's most poorly written rate limited error message or something? :/


I'm considering making it email me when an character affiliation API starts failing so I can see if I can observe it from a different IP.


That is NOT a rate limit message. Can you post the details of a specific request that failed? Details such as date, time, endpoint, url paramaters, any headers you set such as user-agent, etc. Feel free to EVE Mail me if you don't want to post publicly.

EVE mail sent
CCP FoxFour
C C P
C C P Alliance
#7 - 2015-05-21 10:53:08 UTC
I did miss your previous email. I have done some digging and found out whats causing the problem. Now I just need to fix it. :D

Being the terrible noob with C# I am, mainly a Python person here, I was unaware the C# hates your stupid guts if you try and edit a collection while iterating over it.

When I take the list of IDs you provide I check each ID to see if it's cached. If it is not found in the cache I add it to a new list called unCachedCharacterIDList. If that list is greater than 0 in length I get a lock and recheck the cache. To recheck the cache I loop over that unCachedCharacterIDList list and if the ID is found in cache on the second check I try and remove it from the uncached list. C# doesn't like you doing that. Whelp.

So this issue would happen if two requests came in for the same character ID very close to each other. The first request would succeed and the second request, having checked the cache before the first request finished, would not have found it but found it on the second attempt to check the cache. It would however just **** off and die at that point ruining all my plans for greatness.

Working on a fix now.

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.

CCP FoxFour
C C P
C C P Alliance
#8 - 2015-05-21 13:15:34 UTC
Have a fix locally and tested. Pushing it to Sisi now for some further testing.

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.

CCP FoxFour
C C P
C C P Alliance
#9 - 2015-05-21 13:28:06 UTC
Testing seems to be fine on Sisi. It is a bit of a hard issue to replicate but I tried a few things to do it. Going to push to TQ.

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.

CCP FoxFour
C C P
C C P Alliance
#10 - 2015-05-21 13:45:01 UTC
All done. Fix is deployed to TQ. Let me know if you still run into problems.

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.

Mister Ripley
Ministry of War
Amarr Empire
#11 - 2015-05-21 14:38:03 UTC
3 hours, the bug is fixed and fix is live. Jesus christ ShockedShockedShocked I have no words.
Jack Tronic
borkedLabs
#12 - 2015-05-21 14:42:27 UTC
Well that error log I linked in the eve mail hasn't updated with any scotty in over a hour so it appears to be fixed.

Thanks.
CCP FoxFour
C C P
C C P Alliance
#13 - 2015-05-21 15:48:56 UTC
Jack Tronic wrote:
Well that error log I linked in the eve mail hasn't updated with any scotty in over a hour so it appears to be fixed.

Thanks.


Glad to hear it. :)

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.

CCP FoxFour
C C P
C C P Alliance
#14 - 2015-05-21 15:49:55 UTC
Mister Ripley wrote:
3 hours, the bug is fixed and fix is live. Jesus christ ShockedShockedShocked I have no words.


That includes the lunch and game of HotS. :D

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.

Max Kolonko
Caldari Provisions
Caldari State
#15 - 2015-05-21 16:27:14 UTC
CCP FoxFour wrote:
Mister Ripley wrote:
3 hours, the bug is fixed and fix is live. Jesus christ ShockedShockedShocked I have no words.


That includes the lunch and game of HotS. :D


You play hots? I had higher expectations...
CCP FoxFour
C C P
C C P Alliance
#16 - 2015-05-21 16:53:32 UTC
Max Kolonko wrote:
CCP FoxFour wrote:
Mister Ripley wrote:
3 hours, the bug is fixed and fix is live. Jesus christ ShockedShockedShocked I have no words.


That includes the lunch and game of HotS. :D


You play hots? I had higher expectations...


Eh, your issue not mine. :P

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.