Skip to content

Error in Windows due to using net-http-persistent #124

Closed

Description

@mikeyoon

The net-http-persistent gem doesn't run on windows due to it relying on unix functions. Stripe had the same issue and chose to workaround it by falling back on net_http.

stripe/stripe-ruby#703

There is a PR (drbrain/net-http-persistent#90) to fix this on net-http-persistent, but the maintainer seems to have abandoned the project.

Activity

  1. eli-darkly commented on Jan 31, 2019

    @eli-darkly
    Contributor

    Thanks for bringing this to our attention. I guess this means we haven't had any Windows developers using the Ruby SDK in the past. The approach used in that Stripe PR may well be the way to go; we'll look into it ASAP.

    (We hadn't been running CI tests in Windows... but we were running them with JRuby and had no problem, which is interesting since that Stripe PR says it doesn't work with JRuby either.)

  2. eli-darkly commented on Jan 31, 2019

    @eli-darkly
    Contributor

    We might also be able to use the keep-alive support that's built into Net::HTTP, but there may have been some reason that I've forgotten why we didn't do that in the first place.

  3. eli-darkly commented on Jan 31, 2019

    @eli-darkly
    Contributor

    I think we are probably going to go with removing net-http-persistent entirely. It provides a somewhat more convenient API for doing keep-alive, as well as connection pooling, but the latter isn't really relevant to what we're doing (we just make one request at a time to the same host). This is a straightforward enough code change and I've tested it successfully, but I'll need to do a bit more testing to make sure there aren't any significant differences in how it responds to error conditions.

  4. eli-darkly commented on Jan 31, 2019

    @eli-darkly
    Contributor

    Also, after making that change, I found that it still wouldn't run on Windows due to a different error: #125 So we're working on that as well.

  5. eli-darkly commented on Feb 14, 2019

    @eli-darkly
    Contributor

    This and #125 have both been fixed in the 5.5.3 release. We're also running a CI test suite in Windows now, although currently it's only for the most recent Ruby version. If you run into any more problems like this, please let us now,.

  6. added a commit that references this issue on Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions