harishaseebat92 commited on
Commit
53d632d
·
1 Parent(s): 4bfc0a9

Fix 504 timeout: increase nginx timeouts to 1 hour for quantum simulations

Browse files
Files changed (1) hide show
  1. docker/nginx.conf +25 -1
docker/nginx.conf CHANGED
@@ -16,7 +16,16 @@ http {
16
  include /etc/nginx/mime.types;
17
  default_type application/octet-stream;
18
  sendfile on;
19
- keepalive_timeout 65;
 
 
 
 
 
 
 
 
 
20
 
21
  map $http_upgrade $connection_upgrade {
22
  default upgrade;
@@ -48,6 +57,11 @@ http {
48
  proxy_set_header X-Forwarded-Proto $scheme;
49
  proxy_set_header Upgrade $http_upgrade;
50
  proxy_set_header Connection $connection_upgrade;
 
 
 
 
 
51
  }
52
 
53
  location /qlbm/ {
@@ -59,6 +73,11 @@ http {
59
  proxy_set_header X-Forwarded-Proto $scheme;
60
  proxy_set_header Upgrade $http_upgrade;
61
  proxy_set_header Connection $connection_upgrade;
 
 
 
 
 
62
  }
63
 
64
  location / {
@@ -70,6 +89,11 @@ http {
70
  proxy_set_header X-Forwarded-Proto $scheme;
71
  proxy_set_header Upgrade $http_upgrade;
72
  proxy_set_header Connection $connection_upgrade;
 
 
 
 
 
73
  }
74
  }
75
  }
 
16
  include /etc/nginx/mime.types;
17
  default_type application/octet-stream;
18
  sendfile on;
19
+
20
+ # Increased timeouts for long-running quantum computations
21
+ keepalive_timeout 3600s;
22
+ proxy_connect_timeout 3600s;
23
+ proxy_read_timeout 3600s;
24
+ proxy_send_timeout 3600s;
25
+ send_timeout 3600s;
26
+
27
+ # Disable buffering for real-time updates
28
+ proxy_buffering off;
29
 
30
  map $http_upgrade $connection_upgrade {
31
  default upgrade;
 
57
  proxy_set_header X-Forwarded-Proto $scheme;
58
  proxy_set_header Upgrade $http_upgrade;
59
  proxy_set_header Connection $connection_upgrade;
60
+
61
+ # Timeouts for long-running quantum simulations
62
+ proxy_connect_timeout 3600s;
63
+ proxy_read_timeout 3600s;
64
+ proxy_send_timeout 3600s;
65
  }
66
 
67
  location /qlbm/ {
 
73
  proxy_set_header X-Forwarded-Proto $scheme;
74
  proxy_set_header Upgrade $http_upgrade;
75
  proxy_set_header Connection $connection_upgrade;
76
+
77
+ # Timeouts for long-running quantum simulations
78
+ proxy_connect_timeout 3600s;
79
+ proxy_read_timeout 3600s;
80
+ proxy_send_timeout 3600s;
81
  }
82
 
83
  location / {
 
89
  proxy_set_header X-Forwarded-Proto $scheme;
90
  proxy_set_header Upgrade $http_upgrade;
91
  proxy_set_header Connection $connection_upgrade;
92
+
93
+ # Timeouts for long-running operations
94
+ proxy_connect_timeout 3600s;
95
+ proxy_read_timeout 3600s;
96
+ proxy_send_timeout 3600s;
97
  }
98
  }
99
  }