Skip to content

SSL server can assume a state where it no longer answers to client requests #25

@triska

Description

@triska

Every few days (sometimes: weeks) of continuous uptime, the HTTPS server I am running assumes a state where it still accepts connections, but does not complete an SSL handshake.

In that state, when I try to connect to the server with openssl, I get:

$ openssl s_client -host $HOST -port 443
CONNECTED(00000003)

followed by nothing more, i.e., nothing more appears and the handshake seems to hang. When the server is still working correctly, the output continues with:

depth=2 C = US, O = "thawte, Inc.", OU = Certification Services Division, OU = "(c) 2008 thawte, Inc. - For authorized use only", CN = thawte Primary Root CA - G3
verify return:1
depth=1 C = US, O = "thawte, Inc.", OU = Domain Validated SSL, CN = thawte DV SSL SHA256 CA
verify return:1
...

Please let me know what I can do to trace this down. I can use gdb to trace locked threads with:

gdb swipl 
(gdb) info threads
 ...
(gdb) thread 
(gdb) bt

I will try this next time this hangs. So far, I could not replicate this issue with any tests. I have run several benchmarks on the server, using the Apache bench tool ab, and it seems to behave as expected in all scenarios I have tried. When the hang occurs, there are still enough available resources on the server to easily make further connections. I can also use all other ports, and can SSH into the server without any problems. Only the HTTPS connections no longer work.

To collect experience with such scenarios, please consider moving the SWI website or other frequently used sites to HTTPS, using native SWI-Prolog to make the connection without intermediary tools. I would also greatly appreciate feedback from other users who use the SSL package, and advice from networking/openssl experts who are interested in helping with this. @chigley, I would greatly appreciate your input in particular, at your convenience.

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