mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
perf: try to reduce memory usage by adding --preload argument for multi workers.
This commit is contained in:
parent
c5aa570482
commit
af5d0dcb9f
|
|
@ -19,6 +19,7 @@ class GunicornService(BaseService):
|
|||
cmd = [
|
||||
'gunicorn', 'maxkb.wsgi:application',
|
||||
'-b', bind,
|
||||
'--preload',
|
||||
'-k', 'gthread',
|
||||
'--threads', '200',
|
||||
'-w', str(self.worker),
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ class GunicornLocalModelService(BaseService):
|
|||
cmd = [
|
||||
'gunicorn', 'maxkb.wsgi:application',
|
||||
'-b', bind,
|
||||
'--preload',
|
||||
'-k', 'gthread',
|
||||
'--threads', '200',
|
||||
'-w', str(worker),
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ class SchedulerService(BaseService):
|
|||
cmd = [
|
||||
'gunicorn', 'maxkb.wsgi:application',
|
||||
'-b', bind,
|
||||
'--preload',
|
||||
'-k', 'gthread',
|
||||
'--threads', '200',
|
||||
'-w', str(self.worker),
|
||||
|
|
|
|||
Loading…
Reference in New Issue