Intermittent OperationalError: could not translate host name when using Tabulator ajaxURL

Hi everyone,

I’m running into a rare, intermittent issue with Tabulator + ajaxURL and I’m curious if anyone else has seen something similar.

The error

Occasionally (and seemingly at random), I get the following error:

OperationalError: could not translate host name 
"company_name.dedicated.internal.anvil.works" 
to address: Name or service not known

Setup

I’m using Tabulator with ajaxURL pointing to an Anvil server route:

"ajaxURL": self.ajax_url,
"ajaxParams": {
    "filters_dict": json.dumps(_filters_dict),
    "num_weeks": self.num_weeks
}

On the server side, the endpoint is defined like this:

@anvil.server.route("/function_name", authenticate_users=True)
def function_name():
    ...

Behavior

  • The setup works most of the time
  • The error happens very rarely and on random occasions
  • No code changes or deploys are involved when it occurs

Has anyone encountered something similar?

Any insights or debugging tips would be appreciated

Thanks!

1 Like

Getting the same error, randomly happens then works again.

Session ID if that helps the anvil team debug it:
4EN3JIOIHFVIYH7HUMUMAF6T47OZISXP

1 Like

Okay found the reason. We are running an uplink script.

This uplink script should only expose certain functions, but due to a chain series of imports, the one function that we did not expect, was pulling through and registered on the uplink server where it did not have context of the environment.

2 Likes

Perhaps this dashboard would have helped: Show list of registered functions in account
:slight_smile:

2 Likes

+1 on the feature request.