Giter VIP home page Giter VIP logo

Comments (4)

dalehenrich avatar dalehenrich commented on August 23, 2024

Timeout now passed through on connect (glassdb/glass@7ec66c5)

from zinc.

jbrichau avatar jbrichau commented on August 23, 2024

@dalehenrich We applied this patch in a 3.1.0.6 extent but I'm getting some weird experimental timings. If we pass 30s to the ZnClient (which is 30000ms passed to the GsSocket timeout parameter), it goes way over 60s. If I set the timeout to 3s, it eventually times out after 8s. For a declared timeout of 5s, it takes over 10s to timeout.

Looking at the code, this is because GSSocket>>connectTo:on:timeoutMs: has a loop where the given timeout value is passed to writeWillNotBlockWithin:, eventually waiting multiple times for the timeout.

I would expect the entire ZnClient connection to timeout after the given value, but now it takes the value multiplied by the length of the addrList variable.

from zinc.

jbrichau avatar jbrichau commented on August 23, 2024

Not sure what the right solution for this is. If I understand correctly, each network interface on the machine gets tried with the specified timeout. It does not seem a good idea to wait for timeoutMs / addrList size :)

from zinc.

jbrichau avatar jbrichau commented on August 23, 2024

Then again... it seems that's the way curl deals with these situations: http://curl.haxx.se/mail/lib-2014-11/0164.html
Or at least they did.... they apply a different distribution of the timeouts but the overall idea remains to divide the timeouts over the possible addresses.

from zinc.

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.