Я использую сервис django, он работает без проблем.Но этим утром внезапно выливается ошибка, как показано ниже.
Internal Server Error: [API end point]
NoCredentialsError at [API end point]
Unable to locate credentials
Exception Value: Unable to locate credentials
File "[project_path]/lib64/python3.7/site-packages/django/core/handlers/exception.py" in inner
34. response = get_response(request)
File "[project_path]/lib64/python3.7/site-packages/django/core/handlers/base.py" in _get_response
126. response = self.process_exception_by_middleware(e, request)
File "[project_path]/lib64/python3.7/site-packages/django/core/handlers/base.py" in _get_response
124. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "[project_path]/lib64/python3.7/site-packages/django/views/decorators/csrf.py" in wrapped_view
54. return view_func(*args, **kwargs)
File "[project_path]/lib64/python3.7/site-packages/django/views/generic/base.py" in view
68. return self.dispatch(request, *args, **kwargs)
File "[project_path]/lib64/python3.7/site-packages/rest_framework/views.py" in dispatch
495. response = self.handle_exception(exc)
File "[project_path]/lib64/python3.7/site-packages/rest_framework/views.py" in handle_exception
455. self.raise_uncaught_exception(exc)
File "[project_path]/lib64/python3.7/site-packages/rest_framework/views.py" in dispatch
492. response = handler(request, *args, **kwargs)
File "/opt/litmus/applications/backend/doorman/views.py" in get
179. return self.list(request, *args, **kwargs)
File "/opt/litmus/applications/backend/doorman/views.py" in list
188. return Response(serializer.data)
File "[project_path]/lib64/python3.7/site-packages/rest_framework/serializers.py" in data
765. ret = super(ListSerializer, self).data
File "[project_path]/lib64/python3.7/site-packages/rest_framework/serializers.py" in data
262. self._data = self.to_representation(self.instance)
File "[project_path]/lib64/python3.7/site-packages/rest_framework/serializers.py" in to_representation
683. self.child.to_representation(item) for item in iterable
File "[project_path]/lib64/python3.7/site-packages/rest_framework/serializers.py" in <listcomp>
683. self.child.to_representation(item) for item in iterable
File "[project_path]/lib64/python3.7/site-packages/rest_framework/serializers.py" in to_representation
527. ret[field.field_name] = field.to_representation(attribute)
File "[project_path]/lib64/python3.7/site-packages/rest_framework/fields.py" in to_representation
1565. if not getattr(value, 'url', None):
File "[project_path]/lib64/python3.7/site-packages/django/db/models/fields/files.py" in url
62. return self.storage.url(self.name)
File "[project_path]/lib64/python3.7/site-packages/storages/backends/s3boto3.py" in url
623. ExpiresIn=expire)
File "[project_path]/lib64/python3.7/site-packages/botocore/signers.py" in generate_presigned_url
595. operation_name=operation_name)
File "[project_path]/lib64/python3.7/site-packages/botocore/signers.py" in generate_presigned_url
268. 'presign-url', expires_in, signing_name)
File "[project_path]/lib64/python3.7/site-packages/botocore/signers.py" in sign
157. auth.add_auth(request)
File "[project_path]/lib64/python3.7/site-packages/botocore/auth.py" in add_auth
357. raise NoCredentialsError
Я не знаю, что делать, поэтому я перезапускаю Джанго (с оружейным рогом).Это работает.
В любом случае, что я могу сделать, если у меня возникает такая проблема?
Как настроить автоматический перезапуск django или восстановить состояние сервера?