Spaces:
Runtime error
Runtime error
Create gunicorn_conf.py
Browse files- gunicorn_conf.py +7 -0
gunicorn_conf.py
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# gunicorn_conf.py
|
| 2 |
+
workers = 2 # adjust based on CPU cores; 1-4 typical for Spaces
|
| 3 |
+
threads = 4 # use threads to avoid blocking other requests
|
| 4 |
+
worker_class = "gthread" # threaded worker is more tolerant of blocking ops
|
| 5 |
+
timeout = 120 # worker timeout in seconds (increase from default 30)
|
| 6 |
+
graceful_timeout = 120
|
| 7 |
+
keepalive = 5
|