File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
apps/common/management/commands/services/services Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -16,13 +16,14 @@ def cmd(self):
1616
1717 log_format = '%(h)s %(t)s %(L)ss "%(r)s" %(s)s %(b)s '
1818 bind = f'{ HTTP_HOST } :{ HTTP_PORT } '
19+ max_requests = 10240 if int (self .worker ) > 1 else 0
1920 cmd = [
2021 'gunicorn' , 'smartdoc.wsgi:application' ,
2122 '-b' , bind ,
2223 '-k' , 'gthread' ,
2324 '--threads' , '200' ,
2425 '-w' , str (self .worker ),
25- '--max-requests' , '10240' ,
26+ '--max-requests' , str ( max_requests ) ,
2627 '--max-requests-jitter' , '2048' ,
2728 '--access-logformat' , log_format ,
2829 '--access-logfile' , '-'
Original file line number Diff line number Diff line change @@ -25,13 +25,14 @@ def cmd(self):
2525 log_format = '%(h)s %(t)s %(L)ss "%(r)s" %(s)s %(b)s '
2626 bind = f'{ CONFIG .get ("LOCAL_MODEL_HOST" )} :{ CONFIG .get ("LOCAL_MODEL_PORT" )} '
2727 worker = CONFIG .get ("LOCAL_MODEL_HOST_WORKER" , 1 )
28+ max_requests = 10240 if int (worker ) > 1 else 0
2829 cmd = [
2930 'gunicorn' , 'smartdoc.wsgi:application' ,
3031 '-b' , bind ,
3132 '-k' , 'gthread' ,
3233 '--threads' , '200' ,
3334 '-w' , str (worker ),
34- '--max-requests' , '10240' ,
35+ '--max-requests' , str ( max_requests ) ,
3536 '--max-requests-jitter' , '2048' ,
3637 '--access-logformat' , log_format ,
3738 '--access-logfile' , '-'
You can’t perform that action at this time.
0 commit comments