Giter VIP home page Giter VIP logo

Comments (10)

GoldenGnu avatar GoldenGnu commented on June 3, 2024

No, we only want to refresh/update the access token once, that is why that part is synchronized.
We have to wait until it's refreshed or we can't update, anyway.

Could you explain what kind of problems you're getting with it?

from eve-esi.

burberius avatar burberius commented on June 3, 2024

The synchronized block should start at


and use the AccessTokenData of that connection only.

We can do that change after #75 as everything is prepared already.

@eve-gatt Do you use the library in production?

from eve-esi.

GoldenGnu avatar GoldenGnu commented on June 3, 2024

I'm going to look into this.
I think we need a stronger link between the refresh token and the access token, and the updating of both

from eve-esi.

eve-gatt avatar eve-gatt commented on June 3, 2024

No, we only want to refresh/update the access token once

Yeah, that makes sense, but that synchronized block means that only 1 thread can update any access token at a time doesn't it?

Could you explain what kind of problems you're getting with it?

Yeah, I suspect the http call is never returning and so all my other threads get queued behind it. I'm trying this for now to see if it helps:

con.setConnectTimeout(10000);
con.setReadTimeout(10000);

@eve-gatt Do you use the library in production?

In that I've got about 40 or so corpies using it daily, yes.

from eve-esi.

eve-gatt avatar eve-gatt commented on June 3, 2024

Specifically, the error I got at 03:17 this morning was:

WARNING: Thread Thread[worker-pilot-tracker-5,5,main] has been blocked for 60090 ms, time limit is 60000 ms 
io.vertx.core.VertxException: Thread blocked 
  	at net.troja.eve.esi.auth.OAuth.getAccessTokenData(OAuth.java:118) 
  	at net.troja.eve.esi.auth.OAuth.applyToParams(OAuth.java:47) 
  	at net.troja.eve.esi.ApiClient.updateParamsForAuth(ApiClient.java:834) 
  	at net.troja.eve.esi.ApiClient.invokeAPI(ApiClient.java:711) 
  	at net.troja.eve.esi.api.LocationApi.getCharactersCharacterIdLocation(LocationApi.java:93) 

from eve-esi.

burberius avatar burberius commented on June 3, 2024

Default Timeout is very likely 300s, so that connection just returns very late, but too late for vertx.
I hope your timeout changes work as expected!

The change to OkHttp probably also helps in this case.

from eve-esi.

eve-gatt avatar eve-gatt commented on June 3, 2024

I thought the default timeout was 0, i.e. infinity. The vertx part is just a warning and I could extend that if there was a valid case for a thread taking > 1min. Let's see how setting an explicit timeout works. Unfortunately this occurs so infrequently that it's difficult to test. I'm not even sure how to simulate it.

from eve-esi.

burberius avatar burberius commented on June 3, 2024

So I would just say lets wait for it and if it still exists, try another fix.
Simulating it would mean you have to drop or slow down those special packages but I think that's way too complicated.

from eve-esi.

GoldenGnu avatar GoldenGnu commented on June 3, 2024

Work-in-progress PR (#79) up for this.

from eve-esi.

GoldenGnu avatar GoldenGnu commented on June 3, 2024

Released in 3.0.0

from eve-esi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.