diff --git a/apps/assets/api/asset/asset.py b/apps/assets/api/asset/asset.py index affd28f03..f1573629e 100644 --- a/apps/assets/api/asset/asset.py +++ b/apps/assets/api/asset/asset.py @@ -122,8 +122,12 @@ class AssetViewSet(SuggestionMixin, NodeFilterMixin, OrgBulkModelViewSet): ] def get_queryset(self): - return super().get_queryset().prefetch_related('nodes', 'protocols')\ + queryset = super().get_queryset() \ + .prefetch_related('nodes', 'protocols') \ .select_related('platform', 'domain') + if queryset.model is not Asset: + queryset = queryset.select_related('asset_ptr') + return queryset def get_serializer_class(self): cls = super().get_serializer_class() diff --git a/apps/common/management/commands/services/services/gunicorn.py b/apps/common/management/commands/services/services/gunicorn.py index 5eab30ec3..bd14284af 100644 --- a/apps/common/management/commands/services/services/gunicorn.py +++ b/apps/common/management/commands/services/services/gunicorn.py @@ -1,5 +1,5 @@ -from ..hands import * from .base import BaseService +from ..hands import * __all__ = ['GunicornService'] @@ -22,7 +22,7 @@ class GunicornService(BaseService): '-b', bind, '-k', 'uvicorn.workers.UvicornWorker', '-w', str(self.worker), - '--max-requests', '4096', + '--max-requests', '40960', '--access-logformat', log_format, '--access-logfile', '-' ]