diff --git a/app/api/v1/api.py b/app/api/v1/api.py index 95c61a3..55e4d3d 100644 --- a/app/api/v1/api.py +++ b/app/api/v1/api.py @@ -1,6 +1,8 @@ import socket import os import platform +import time + import psutil from apiflask import APIBlueprint @@ -114,6 +116,7 @@ def get_image_presign_url(query_data): @api.get('/hello') def hello(): + time.sleep(2) result_one = f'我是您的专属接口提供服务器:' result_two = f'我的机器参数如下' result_three = f'操作系统:{platform.system()}' diff --git a/gunicorn.conf.py b/gunicorn.conf.py index 40bfcfe..d936684 100644 --- a/gunicorn.conf.py +++ b/gunicorn.conf.py @@ -10,7 +10,7 @@ worker_class = 'gevent' # 设置最大并发量 daemon = False debug = False -worker_connections = 2000 +worker_connections = 3000 workers = multiprocessing.cpu_count() * 2 + 1 # 指定每个工作者的线程数