2024-05-05 07:48:57 +00:00
|
|
|
# -*- mode: conf-unix; coding: utf-8 -*-
|
2019-06-29 09:59:13 +00:00
|
|
|
[uwsgi]
|
|
|
|
# Who will run the code
|
2021-10-02 14:10:13 +00:00
|
|
|
uid = searxng
|
|
|
|
gid = searxng
|
2019-06-29 09:59:13 +00:00
|
|
|
|
|
|
|
# Number of workers (usually CPU count)
|
2023-11-12 16:46:34 +00:00
|
|
|
# default value: %k (= number of CPU core, see Dockerfile)
|
|
|
|
workers = $(UWSGI_WORKERS)
|
2024-05-05 07:48:57 +00:00
|
|
|
harakiri = 60
|
|
|
|
# max-requests = 1000 # Restart workers after this many requests
|
|
|
|
# max-worker-lifetime = 3600 # Restart workers after this many seconds
|
|
|
|
reload-on-rss = 4096 # Restart workers after this much resident memory
|
|
|
|
worker-reload-mercy = 60 # How long to wait before forcefully killing workers
|
|
|
|
die-on-term = true # Shutdown when receiving SIGTERM (default is respawn)
|
|
|
|
py-callos-afterfork = true # allow workers to trap signals
|
2023-11-12 16:46:34 +00:00
|
|
|
|
|
|
|
# Number of threads per worker
|
|
|
|
# default value: 4 (see Dockerfile)
|
|
|
|
threads = $(UWSGI_THREADS)
|
2019-06-29 09:59:13 +00:00
|
|
|
|
|
|
|
# The right granted on the created socket
|
|
|
|
chmod-socket = 666
|
|
|
|
|
2022-09-27 15:01:00 +00:00
|
|
|
# Plugin to use and interpreter config
|
2019-06-29 09:59:13 +00:00
|
|
|
single-interpreter = true
|
|
|
|
master = true
|
2024-05-05 07:48:57 +00:00
|
|
|
strict = true
|
|
|
|
vacuum = true # Delete sockets during shutdown
|
|
|
|
need-app = true
|
2019-06-29 09:59:13 +00:00
|
|
|
plugin = python3
|
|
|
|
lazy-apps = true
|
|
|
|
enable-threads = true
|
|
|
|
|
|
|
|
# Module to import
|
|
|
|
module = searx.webapp
|
|
|
|
|
|
|
|
# Virtualenv and python path
|
2021-10-02 14:10:13 +00:00
|
|
|
pythonpath = /usr/local/searxng/
|
|
|
|
chdir = /usr/local/searxng/searx/
|
2019-06-29 09:59:13 +00:00
|
|
|
|
2021-12-28 19:13:13 +00:00
|
|
|
# automatically set processes name to something meaningful
|
|
|
|
auto-procname = true
|
|
|
|
|
2022-03-19 11:27:46 +00:00
|
|
|
# Disable request logging for privacy
|
2021-12-28 19:13:13 +00:00
|
|
|
disable-logging = true
|
2024-05-05 07:48:57 +00:00
|
|
|
log-4xx = true # but log 4xx's anyway
|
|
|
|
log-5xx = true # and 5xx's
|
2021-12-28 19:13:13 +00:00
|
|
|
|
|
|
|
# Set the max size of a request (request-body excluded)
|
|
|
|
buffer-size = 8192
|
2019-06-29 09:59:13 +00:00
|
|
|
|
2020-02-07 18:16:15 +00:00
|
|
|
# No keep alive
|
|
|
|
# See https://github.com/searx/searx-docker/issues/24
|
|
|
|
add-header = Connection: close
|
2020-02-25 16:25:11 +00:00
|
|
|
|
2024-04-26 21:42:29 +00:00
|
|
|
# Follow SIGTERM convention
|
|
|
|
# See https://github.com/searxng/searxng/issues/3427
|
|
|
|
die-on-term
|
|
|
|
|
2020-02-25 16:25:11 +00:00
|
|
|
# uwsgi serves the static files
|
2021-10-02 14:10:13 +00:00
|
|
|
static-map = /static=/usr/local/searxng/searx/static
|
2023-09-22 05:50:09 +00:00
|
|
|
# expires set to one day
|
|
|
|
static-expires = /* 86400
|
2020-02-25 16:25:11 +00:00
|
|
|
static-gzip-all = True
|
|
|
|
offload-threads = %k
|