question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for concurrent connections

See original GitHub issue

Hi, I’m using the client to refresh multiple extracts via Airflow, the issue is that at a point multiple executions use the client and attempt to refresh an extract. When you sign in to the server, the concurrent run token stops working and then the process fails.

Is there any way to have concurrent server connections up and running?

To replicate this issue you can open a Python console and then:

import tableauserverclient as tsc
tableau_auth = tsc.PersonalAccessTokenAuth(token_name, access_token)
server = tsc.Server(tableau_host, use_server_version=True)
server.auth.sign_in_with_personal_access_token(tableau_auth)
resp = server.datasources.get()

Then run the code again on a new console, go back to the first console and try to run the following line only:

resp = server.datasources.get()

You’ll get the following error: 401002: Unauthorized Access Invalid authentication credentials were provided.

Thanks!

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:4
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

10reactions
saulbeincommented, Nov 30, 2020

It only allows one session per access token, so you would need to create and use one personal access token per process.

Why was it designed this way though? This causes an insane amount of work when trying to run a web server that calls Tableau APIs. Using multiple tokens does not solve this still, because there is no easy way to distribute them among server worker processes (and in my specific case, threads that are spawned by these workers).

At this point I am considering writing a microservice just to proxy requests and avoid concurrent token usage. Maybe I am missing something here, but I have also never encountered any other API with this kind of limitation, especially since the personal access tokens (essentially API keys) are exchanged with standard timed tokens. Why are these tokens then linked to sessions at all?

3reactions
shinchriscommented, Nov 6, 2020

Hi @gtcourreges, this is an expected behavior when using personal access tokens. It only allows one session per access token, so you would need to create and use one personal access token per process.

Another option would be to authenticate using username/password, which will not invalidate previous sessions upon signing in.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure Profile Container and Office for concurrent or ...
Instructions for supporting multiple connections and concurrent connections with Profile Container.
Read more >
web hosting - What does concurrent connection mean?
"Concurrent connection" means the maximum number of TCP connections your server can handle at any one time. At any given time many TCP/IP ......
Read more >
Concurrent Connections vs Visitors | Media Temple Community
The article below will help illustrate how the relationship between a concurrent connection and visitor can look in regards to your server. For...
Read more >
What is a Concurrent Connection? (Scenario & Solution)
Concurrent Connection. The number of authenticated “handshakes” between a client and/or server during any given time.
Read more >
What are Concurrent Connections? - Amity
Concurrent Connections are counted as the highest number of concurrently connected devices to the Amity Social Cloud servers within a given month.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found