Code Monkey home page Code Monkey logo

Comments (6)

Willthegod avatar Willthegod commented on August 16, 2024

I had the same issue...

from binance-java-api.

Micha1990 avatar Micha1990 commented on August 16, 2024

Same issue here..

from binance-java-api.

joaopsilva avatar joaopsilva commented on August 16, 2024

@gizmochief7 this happened when placing a new order?

from binance-java-api.

gizmochief7 avatar gizmochief7 commented on August 16, 2024

@joaopsilva Yes, but not every time I placed a new order. It would happen after several hours of successful buying and selling transactions. I added in a temp hack that sorta helped by clearing the interceptors list when createService method was called in the BinanceApiServiceGenerator class. The reason I did this hack (and by no means am I saying this was the fix), I found in a okhttp3 form that it was suggested to clear the list. I also added some debugging to the interceptor that just counted how many times it was called. I found that every interceptor that was in the list was called ever time a new interceptor was added which grew at a factorial rate which eventually lead to the stackoverFlow. The error went away but it would then just stop receiving web socket events a few hours later as @lange88 commented on @datalorax PR 3 days ago "after ~16 hours of streaming the web sockets are no longer receiving any data (no exceptions are thrown, the data just stops)" I decided to just stop using it until the web socket connection was stable. So I've been checking in every couple days to see if you had merged @datalorax pull request Error handling and shutdown improvements. I'm hoping these fixes make it stable. However, I did a quick test using his and where i expected to receive an error to happen so that i could clean up the connection, close the socket and reopen it but I found that it didn't throw an error and quietly wasn't working. Hopefully when @datalorax pull request is merged, this will fix the issues. As a side note, I would love to see an example of setting up the websocket with restart fail-over in place so has been shown to last a couple days. The same would be nice for User data stream. I see the same problem the @octn brought up in User data stream premature closing

from binance-java-api.

big-andy-coates avatar big-andy-coates commented on August 16, 2024

@gizmochief7 I've raised the above PR to fix this issue.

Note: while the above PR fixes this issue, the fact you are seeing this issue suggests that your application is frequently creating new Binance clients, (rest or ws), rather than creating a client once and re-using. You should probably also look to create the client once!

from binance-java-api.

joaopsilva avatar joaopsilva commented on August 16, 2024

Indeed @gizmochief7 , you should re-use the client.

from binance-java-api.

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.