These are chat archives for arenanet/api-cdi

10th
Apr 2018
Archomeda
@Archomeda
Apr 10 2018 04:40

Oh, regarding what happened to gw2spidy, making it somehow update again by me manually visiting the API endpoint (at first, it's now crawling every 5 minutes automatically for the time being), is making me remember of something familiar. About 1.5 weeks ago I had a similar issue with gw2efficiency not properly updating my account's TP current buy orders (which I guess is well-known at this point). And after I visited the API endpoint manually myself, the API suddenly updated and efficiency started showing my orders. Now, I'm fairly certain that efficiency's frontend gets those orders from XHR through the browser, and not by a server proxy. So I'm not sure what kind of shenanigans happened here.

Anyway, the same thing happened just now. A few minutes ago, the API still showed 133 amalgamated gemstones in my buy orders that had been fulfilled some time ago already (I just visited it now, without doing that for the past week or so). About a few minutes later I refreshed it, and it now shows the correct buy order of 3 smooth scales.

I just started matching these two issues together as they seem to have similar solutions somehow. Although, the question remains, is caching the problem? And if it is, is it somehow affected by the originating IP and/or request headers? Like what you can see with gw2spidy continuously requesting the exchange data (presumably from one server IP) with (probably) quantity parameters that barely anyone uses besides gw2spidy, with however no up-to-date and seemingly stuck results. And then I come along requesting the page from a different IP and with different headers, and it suddenly starts updating again on that exact moment.

I hope what I've typed is clear enough for everyone to understand what I'm getting at. I'm not sure if this is correct at all (or if these two issues are related at all), but this definitely is some food for thought.

Archomeda
@Archomeda
Apr 10 2018 13:44
Alright, a day later and these are the results: https://archomeda.github.io/gw2-scripts/gem-exchange.html
Archomeda
@Archomeda
Apr 10 2018 19:22
@apoch @dsnider-anet do you have any idea how it's possible that these gem exchange results show up?
Werdes
@werdes
Apr 10 2018 19:36
@lye :cry:
Mike Lewis
@apoch
Apr 10 2018 21:20
@Archomeda off the top of my head I don't have any idea, but the consistent issues with cached/stale data might offer some clues. I will poke a few things.
Mike Lewis
@apoch
Apr 10 2018 21:28
@Archomeda I assume you're only using the /v2/commerce/exchange endpoint for this? I am not 100% sure but I think it might be (accidentally?) set to 60 minutes TTL
Archomeda
@Archomeda
Apr 10 2018 21:30
Yeah, that link refers to the results of that endpoint, which I just updated because the patch caused some funny spikes in them.
the 60m ttl might explain a few, but not all, things
like the coins -> gems (which is /v2/commerce/exchange/coins) with the quantity of 100,000,000 coins became stuck again right after the patch
Mike Lewis
@apoch
Apr 10 2018 21:32
yep, just noticing that
Archomeda
@Archomeda
Apr 10 2018 21:33
however, the 1,000,000 keeps updating just fine i think
with give or take an hour interval as you suggested
Mike Lewis
@apoch
Apr 10 2018 21:34
yeah there's something going on with our caching I suspect. We'll be digging into it
Archomeda
@Archomeda
Apr 10 2018 21:35
The gems -> coins is a funny one with the random line :P because my script takes a random value between 400 and 2000, it's more likely to use one that has been used before. And I think that's where the drops come from right after the patch.
Alright :+1:
If you need me at any point, I'll be happy to help. I'll keep monitoring the results and update the page every once in a while.
David ReeƟ
@queicherius
Apr 10 2018 22:22
@apoch Any pointers what's wrong with the tradingpost API?