adjust gunicorn logging and fix service
This commit is contained in:
parent
4b3e0671c6
commit
6785079fea
|
@ -8,9 +8,13 @@ Requires=local-llm-daemon.service
|
||||||
User=server
|
User=server
|
||||||
Group=server
|
Group=server
|
||||||
WorkingDirectory=/srv/server/local-llm-server
|
WorkingDirectory=/srv/server/local-llm-server
|
||||||
# Need a lot of workers since we have long-running requests
|
|
||||||
# Takes about 3.5G memory
|
# Sometimes the old processes aren't terminated when the service is restarted.
|
||||||
ExecStart=/srv/server/local-llm-server/venv/bin/gunicorn --workers 20 --bind 0.0.0.0:5000 server:app --timeout 60 --worker-class gevent
|
ExecStartPre=/usr/bin/pkill -9 -f "/srv/server/local-llm-server/venv/bin/python3 /srv/server/local-llm-server/venv/bin/gunicorn"
|
||||||
|
|
||||||
|
# Need a lot of workers since we have long-running requests. This takes about 3.5G memory.
|
||||||
|
ExecStart=/srv/server/local-llm-server/venv/bin/gunicorn --workers 20 --bind 0.0.0.0:5000 server:app --timeout 60 --worker-class gevent --access-logfile '-' --error-logfile '-'
|
||||||
|
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=2
|
RestartSec=2
|
||||||
SyslogIdentifier=local-llm-server
|
SyslogIdentifier=local-llm-server
|
||||||
|
|
Reference in New Issue