So after switching all the Dash imports excep for a top level dash to register pages I am getting weird connection errors with Redis (which I am guessing could have been there all along). Does the following stack trace mean anything to you? I see the request passes through the dash_extensions package but I am not sure if this is something I am inadvertantly doing.
redis://data:6379
Exception on /_dash-update-component [POST]
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/redis/connection.py", line 624, in connect
sock = self.retry.call_with_retry(
File "/usr/local/lib/python3.10/site-packages/redis/retry.py", line 46, in call_with_retry
return do()
File "/usr/local/lib/python3.10/site-packages/redis/connection.py", line 625, in <lambda>
lambda: self._connect(), lambda error: self.disconnect(error)
File "/usr/local/lib/python3.10/site-packages/redis/connection.py", line 690, in _connect
raise err
File "/usr/local/lib/python3.10/site-packages/redis/connection.py", line 678, in _connect
sock.connect(socket_address)
OSError: [Errno 99] Cannot assign requested address
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2525, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1822, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1820, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1796, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/usr/local/lib/python3.10/site-packages/dash/dash.py", line 1274, in dispatch
ctx.run(
File "/usr/local/lib/python3.10/site-packages/dash/_callback.py", line 440, in add_context
output_value = func(*func_args, **func_kwargs) # %% callback invoked %%
File "/usr/local/lib/python3.10/site-packages/dash_extensions/enrich.py", line 1232, in decorated_function
if not output.backend.has(unique_id):
File "/usr/local/lib/python3.10/site-packages/cachelib/redis.py", line 133, in has
return bool(self._read_client.exists(self.key_prefix + key))
File "/usr/local/lib/python3.10/site-packages/redis/commands/core.py", line 1697, in exists
return self.execute_command("EXISTS", *names)
File "/usr/local/lib/python3.10/site-packages/redis/client.py", line 1255, in execute_command
conn = self.connection or pool.get_connection(command_name, **options)
File "/usr/local/lib/python3.10/site-packages/redis/connection.py", line 1427, in get_connection
connection.connect()
File "/usr/local/lib/python3.10/site-packages/redis/connection.py", line 630, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 99 connecting to localhost:6379. Cannot assign requested address.
The first line is the printed connection string. I eliminated the password temporarily to test if it could be an authentication issue, which it does not seem to be.
One thing I did notice is that it is trying to connect on localhost instead of the data host that the Flask cache Redis uses. Could it be switching out or using another Redis than the Flask cache Redis?