Skip to content

Long running Jobs give connectionError when signing in  #1180

Description

@VDFaller

Describe the bug

I have a package where I standardize the way we're authenticating. So the server and tableau_auth are initialized on import of my package. Then downstream there are jobs that run anywhere from 10 minutes to 4 hours. But if they use

with server.auth.sign_in(tableau_auth):
  print("do_anything")

It fails. Funnily enough, after it runs I can run the same function and it runs fine.

I can get around it by just trying multiple times for the sign in.

def sign_in():
    for i in range(5):
        try:
            cxn = server.auth.sign_in(tableau_auth)
            return cxn
        except requests.exceptions.ConnectionError as e:
            continue
        except:
            raise
    if i == 5: 
        raise ConnectionError("Failed to connect after 5 attempts")

# and doing
with sign_in():
  print("do_anything")

Versions

Details of your environment, including:

  • tableau online
  • Python version 3.9.12
  • TSC library version =0.18.0

Results

ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

Other Info

I tried to sign in multiple times because of this SO post

NOTE: Be careful not to post user names, passwords, auth tokens or any other private or sensitive information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions