Skip to content

"Connection reset by peer" errors occur after pauses >15min #763

@exdevlin

Description

@exdevlin

Observed

  1. Our application initializes a connection with the BoxSDK near the beginning of execution to fetch IDs and locate files.
  2. Our application then does intense processing that may take anywhere from a few minutes to upwards of half an hour, depending on data ingestion sizes.
  3. Our application then attempts to save new artifacts to Box, and immediately raises this Exception: WARNING:boxsdk.network.default_network:[31mRequest "GET https://api.box.com/2.0/folders/140796660496/items" failed with ConnectionError exception: ConnectionError(ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')))
  • This Exception is only observed if the gap in Step 2 is longer than 15 minutes. This behaviour has only been observed since August 12, 2022
  • We are using Python 3.8.5
  • We are using boxsdk==2.12.1 (attempted upgrading to 3.4.0 as well)

Currently we are wrapping the exception with function that re-initializes the boxsdk.Client() object and retries. While this does work, we would like some clarity on why connections are forcibly terminated on Box's side and what the best practice should be here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dontstaleMark issues not to be removed by stalebot

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions