Support for concurrent connections
See original GitHub issueHi, 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:
- Created 3 years ago
- Reactions:4
- Comments:10 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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?
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.