Code Monkey home page Code Monkey logo

Comments (4)

crspybits avatar crspybits commented on May 17, 2024

An update on this issue. I am getting some failures with an issue that seems directly connected to the above SSL usage with my Kitura-based server.

When I run the server on MacOS, using self-signing certificates (and following the technique given here https://developer.ibm.com/swift/2016/09/22/securing-kitura-part-1-enabling-ssltls-on-your-swift-server/), I get the above kind of error (i.e., errSSLClosedAbort). Plus, with certain of my endpoints my call to RouterResponse's end method blocks the server thread. This is happening specifically when I am completing a download of data using a HTTP GET. On MacOS, when the server blocks on these end calls, the client doesn't notice-- e.g., it is not also blocked.

When I run the server on Ubuntu 16.04 Linux, I run into a similar but even more severe situation. These same end calls tend to block the server thread, and the client side times out on these endpoint calls.

I should mention, I'm using an iOS Swift-based client with URLSession's to do the downloads and other server endpoint communication.

This is an open source project, and I could point you to the code. So far, I'm just trying to characterize the problem and haven't tried creating a simpler instance of the problem.

from kitura-net.

crspybits avatar crspybits commented on May 17, 2024

Further update. I've now tried this with a CA Authority signed SSL certificate (from https://letsencrypt.org). The same basic issue occurs. When I'm doing multiple successive of these in a row, the server thread blocks on a GET download of data. This is where it's failing in my server: https://github.com/crspybits/SyncServerII/blob/master/Server/Sources/Server/ServerSetup.swift#L146

I'm running the following test on my iOS client:
https://github.com/crspybits/SyncServerII/blob/master/iOS/Example/Tests/Performance.swift#L53

Also, and I'm not sure how/if this is related, I am getting lots of the error:
[2017-05-25T03:23:30.802Z] [ERROR] [HTTPServer.swift:194 listen(listenSocket:socketManager:)] Error accepting client connection: Error code: 1(0x1), ERROR: SSL_accept, code: 1, reason: Could not determine error reason.

from kitura-net.

crspybits avatar crspybits commented on May 17, 2024

Still having the same kind of issue, and I've detailed progress here:
https://stackoverflow.com/questions/44224048/timeout-issue-when-downloading-from-aws-ec2-to-ios-app

from kitura-net.

crspybits avatar crspybits commented on May 17, 2024

It looks like I've got a work-around for this issue. Take a look at Update5 on my stackoverflow post above. I still have some concerns about being able to get the server into a state where there are numerous server threads blocked. It looks like a client can cause the server to get into such a state. Any suggestions would be welcomed.

from kitura-net.

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.