tableau / TabPy

Execute Python code on the fly and display results in Tableau visualizations:
https://tableau.github.io/TabPy/
MIT License
1.56k stars 598 forks source link

ReadTimeOut error on a tabpy query #326

Closed sauravsy closed 5 years ago

sauravsy commented 5 years ago

Environment information:

Describe the issue I'm trying to run a function that calls an API using requests.post. I have deployed the function on tabpy server and I am querying it from my Tableau Dashboard. Since I am passing 400 rows, it calls the API 400 times from the deployed function on tabpy server. The error message that I got after 2 mins 30 secs was:

Unable to complete action An error occurred while communicating with the External Service. Error processing script ReadTimeout : HTTPConnectionPool(host='localhost', port=9004): Read timed out. (read timeout=30)

0golovatyi commented 5 years ago

@sauravsy Just to clarify - you are calling a deployed model which then makes HTTP call for each value in input data?

There are 2 different places in TabPy code where timeout is used:

  1. TABPY_EVALUATE_TIMEOUT parameter in config file specifies timeout for script evaluation.
  2. For deployed models call has its own timeout (hardcoded for now) - see evaluation_plane_handler.py

Tableau Desktop also has its own timeout setting.

First, you need to confirm which piece of code is timing out. See if there's anything in TabPy logs can be useful.