Everything seems to be working with FastAPI 110 now!! Need to work on SQLAlchemy upgrade to 2.0.29 soon.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
@@ -21,21 +26,26 @@ server {
|
||||
client_max_body_size ${OSIT_WEB_MAX_BODY_SIZE}; # 5120M; #4096M or 4G; 5120M or 5G;
|
||||
|
||||
location / {
|
||||
# Based on recommendations here: https://www.uvicorn.org/deployment/#running-behind-nginx
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
|
||||
# I think "X-Real-IP" might be needed for some things?
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
# This is needed for long running Python code. Default is 60 seconds
|
||||
# Increased from 1200 to 1500 on 2022-04-17
|
||||
# Increased from 1500 to 2000 on 2023-03-15
|
||||
# Increased proxy read timeout to 2100 and decreased fastcgi options to 35s on 2023-03-16
|
||||
fastcgi_connect_timeout 4s;
|
||||
fastcgi_send_timeout 5s;
|
||||
fastcgi_read_timeout 5s;
|
||||
# fastcgi_connect_timeout 4s;
|
||||
# fastcgi_send_timeout 5s;
|
||||
# fastcgi_read_timeout 5s;
|
||||
|
||||
# proxy read timeout being too low will cause 504 Gateway Time-out on the client browser
|
||||
proxy_read_timeout 2100s;
|
||||
@@ -101,21 +111,26 @@ server {
|
||||
client_max_body_size ${OSIT_WEB_MAX_BODY_SIZE}; # 5120M; #4096M or 4G; 5120M or 5G;
|
||||
|
||||
location / {
|
||||
# Based on recommendations here: https://www.uvicorn.org/deployment/#running-behind-nginx
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
|
||||
# This is needed for long running Python code. Default is 60 seconds
|
||||
# Increased from 1200 to 1500 on 2022-04-17
|
||||
# Increased from 1500 to 2000 on 2023-03-15
|
||||
# Increased proxy read timeout to 2100 and decreased fastcgi options to 35s on 2023-03-16
|
||||
fastcgi_connect_timeout 35s;
|
||||
fastcgi_send_timeout 35s;
|
||||
fastcgi_read_timeout 35s;
|
||||
# I think "X-Real-IP" might be needed for some things?
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
# # This is needed for long running Python code. Default is 60 seconds
|
||||
# # Increased from 1200 to 1500 on 2022-04-17
|
||||
# # Increased from 1500 to 2000 on 2023-03-15
|
||||
# # Increased proxy read timeout to 2100 and decreased fastcgi options to 35s on 2023-03-16
|
||||
# fastcgi_connect_timeout 35s;
|
||||
# fastcgi_send_timeout 35s;
|
||||
# fastcgi_read_timeout 35s;
|
||||
|
||||
# proxy read timeout being too low will cause 504 Gateway Time-out on the client browser
|
||||
proxy_read_timeout 2100s;
|
||||
|
||||
Reference in New Issue
Block a user