mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
refactor: never restart core worker if worker=1.
This commit is contained in:
parent
923f3f1f5e
commit
2050adfdc5
|
|
@ -18,13 +18,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', 'maxkb.wsgi:application',
|
||||
'-b', bind,
|
||||
'-k', 'gthread',
|
||||
'--threads', '200',
|
||||
'-w', str(self.worker),
|
||||
'--max-requests', '10240',
|
||||
'--max-requests', str(max_requests),
|
||||
'--max-requests-jitter', '2048',
|
||||
'--timeout', '0',
|
||||
'--graceful-timeout', '0',
|
||||
|
|
|
|||
Loading…
Reference in New Issue