mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-25 17:22:55 +00:00
fix: update max-requests configuration to be dynamic based on worker count
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
This commit is contained in:
parent
435491d9e6
commit
1108a8536e
|
|
@ -16,13 +16,14 @@ class GunicornService(BaseService):
|
|||
|
||||
log_format = '%(h)s %(t)s %(L)ss "%(r)s" %(s)s %(b)s '
|
||||
bind = f'{HTTP_HOST}:{HTTP_PORT}'
|
||||
max_requests = 10240 if int(self.worker) > 1 else 0
|
||||
cmd = [
|
||||
'gunicorn', 'smartdoc.wsgi:application',
|
||||
'-b', bind,
|
||||
'-k', 'gthread',
|
||||
'--threads', '200',
|
||||
'-w', str(self.worker),
|
||||
'--max-requests', '10240',
|
||||
'--max-requests', str(max_requests),
|
||||
'--max-requests-jitter', '2048',
|
||||
'--access-logformat', log_format,
|
||||
'--access-logfile', '-'
|
||||
|
|
|
|||
|
|
@ -25,13 +25,14 @@ class GunicornLocalModelService(BaseService):
|
|||
log_format = '%(h)s %(t)s %(L)ss "%(r)s" %(s)s %(b)s '
|
||||
bind = f'{CONFIG.get("LOCAL_MODEL_HOST")}:{CONFIG.get("LOCAL_MODEL_PORT")}'
|
||||
worker = CONFIG.get("LOCAL_MODEL_HOST_WORKER", 1)
|
||||
max_requests = 10240 if int(worker) > 1 else 0
|
||||
cmd = [
|
||||
'gunicorn', 'smartdoc.wsgi:application',
|
||||
'-b', bind,
|
||||
'-k', 'gthread',
|
||||
'--threads', '200',
|
||||
'-w', str(worker),
|
||||
'--max-requests', '10240',
|
||||
'--max-requests', str(max_requests),
|
||||
'--max-requests-jitter', '2048',
|
||||
'--access-logformat', log_format,
|
||||
'--access-logfile', '-'
|
||||
|
|
|
|||
Loading…
Reference in New Issue