Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Issues in long running script #224

@ojii

Description

@ojii

We're using hyper in a long running script, opening a single connection and re-using it. So far we've encountered two problems with that, though it looks like both are a manifestation of the same thing, the connection being closed by the remote end. I don't think this is something hyper can/should handle itself, but maybe it should raise more obvious errors (that are also easier to catch).

The first issue we had was HTTP20Connection._sock becoming None, making HTTP20Connection.get_response fail with AttributeError: 'NoneType' object has no attribute 'recv'. Our solution for now is to simply wrap our request/response code in try/except and re-establishing the connection on error.

The second one we get is SSLError: ('The read operation timed out',) again in HTTP20Connection.get_response. This could just be a networking issue and not a connection being closed, but we're not sure.

If anyone knows some tricks using hyper in very long running scripts, I'd love to hear them.

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