2024-09-29 09:09:11 [ERRO] Internal Server Error: /api/v1/terminal/terminals/config/
Traceback (most recent call last):
File “/opt/py3/lib/python3.11/site-packages/django_redis/cache.py”, line 29, in _decorator
return method(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/py3/lib/python3.11/site-packages/django_redis/cache.py”, line 99, in _get
return self.client.get(key, default=default, version=version, client=client)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/py3/lib/python3.11/site-packages/django_redis/client/default.py”, line 260, in get
raise ConnectionInterrupted(connection=client) from e
django_redis.exceptions.ConnectionInterrupted: Redis ConnectionError: Too many connections
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/opt/py3/lib/python3.11/site-packages/asgiref/sync.py”, line 518, in thread_handler
raise exc_info[1]
File “/opt/py3/lib/python3.11/site-packages/django/core/handlers/exception.py”, line 43, in inner
response = await get_response(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/py3/lib/python3.11/site-packages/asgiref/sync.py”, line 518, in thread_handler
raise exc_info[1]
File “/opt/py3/lib/python3.11/site-packages/django/core/handlers/base.py”, line 253, in _get_response_async
response = await wrapped_callback(
^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/py3/lib/python3.11/site-packages/asgiref/sync.py”, line 468, in call
ret = await asyncio.shield(exec_coro)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/py3/lib/python3.11/site-packages/asgiref/current_thread_executor.py”, line 40, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/py3/lib/python3.11/site-packages/asgiref/sync.py”, line 522, in thread_handler
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/contextlib.py”, line 81, in inner
return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
File “/opt/py3/lib/python3.11/site-packages/django/views/decorators/csrf.py”, line 55, in wrapped_view
return view_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/py3/lib/python3.11/site-packages/django/views/generic/base.py”, line 103, in view
return self.dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/py3/lib/python3.11/site-packages/rest_framework/views.py”, line 509, in dispatch
response = self.handle_exception(exc)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/py3/lib/python3.11/site-packages/rest_framework/views.py”, line 469, in handle_exception
self.raise_uncaught_exception(exc)
File “/opt/py3/lib/python3.11/site-packages/rest_framework/views.py”, line 480, in raise_uncaught_exception
raise exc
File “/opt/py3/lib/python3.11/site-packages/rest_framework/views.py”, line 497, in dispatch
self.initial(request, *args, **kwargs)
File “/opt/py3/lib/python3.11/site-packages/rest_framework/views.py”, line 415, in initial
self.check_permissions(request)
File “/opt/py3/lib/python3.11/site-packages/rest_framework/views.py”, line 332, in check_permissions
if not permission.has_permission(request, self):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/jumpserver/apps/rbac/permissions.py”, line 141, in has_permission
has = request.user.has_perms(perms)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/py3/lib/python3.11/site-packages/django/contrib/auth/models.py”, line 320, in has_perms
return all(self.has_perm(perm, obj) for perm in perm_list)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/py3/lib/python3.11/site-packages/django/contrib/auth/models.py”, line 320, in
return all(self.has_perm(perm, obj) for perm in perm_list)
^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/py3/lib/python3.11/site-packages/django/contrib/auth/models.py”, line 311, in has_perm
return _user_has_perm(self, perm, obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/py3/lib/python3.11/site-packages/django/contrib/auth/models.py”, line 220, in _user_has_perm
if backend.has_perm(user, perm, obj):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/jumpserver/apps/rbac/backends.py”, line 29, in has_perm
has_perm = bool(perm_set & set(user_obj.perms))
^^^^^^^^^^^^^^
File “/opt/jumpserver/apps/common/utils/common.py”, line 254, in get
value = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File “/opt/jumpserver/apps/users/models/user/_role.py”, line 289, in perms
return self.cached_role_and_perms[“perms”]
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/jumpserver/apps/common/utils/common.py”, line 254, in get
value = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File “/opt/jumpserver/apps/users/models/user/_role.py”, line 252, in cached_role_and_perms
data = cache.get(key)
^^^^^^^^^^^^^^
File “/opt/py3/lib/python3.11/site-packages/django_redis/cache.py”, line 92, in get
value = self._get(key, default, version, client)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/py3/lib/python3.11/site-packages/django_redis/cache.py”, line 36, in _decorator
raise e.cause
File “/opt/py3/lib/python3.11/site-packages/django_redis/client/default.py”, line 258, in get
value = client.get(key)
^^^^^^^^^^^^^^^
File “/opt/py3/lib/python3.11/site-packages/redis/commands/core.py”, line 1830, in get
return self.execute_command(“GET”, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/py3/lib/python3.11/site-packages/redis/client.py”, line 540, in execute_command
conn = self.connection or pool.get_connection(command_name, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/py3/lib/python3.11/site-packages/redis/connection.py”, line 1099, in get_connection
connection = self.make_connection()
^^^^^^^^^^^^^^^^^^^^^^
File “/opt/py3/lib/python3.11/site-packages/redis/connection.py”, line 1137, in make_connection
raise ConnectionError(“Too many connections”)
redis.exceptions.ConnectionError: Too many connections