7 Commits

Author SHA1 Message Date
Manav Rathi
0b3ca8db69 [server] Increase HTTP request body size to prevent 413 Too Large errors
Allow HTTP request body up to 4 MB. The default is 1 MB, which is too small for
face embeddings for photos with more than a couple of hundred faces.

Roughly, each face embedding is 4KB, but encrypting and base-64-ing the
embedding also has a 30% addition (just from one sample I saw), so this should
allow photos with ~700 faces to go through.

Ref:
- https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size
2024-07-05 14:08:10 +05:30
Manav Rathi
407eca5414 [server] nginx configuration improvements
- Use keepalives
- Update deprecated http2 syntax
- Document how to check config

Refs:
- https://www.nginx.com/blog/avoiding-top-10-nginx-configuration-mistakes/#no-keepalives
- https://github.com/nginxinc/kubernetes-ingress/issues/4237
- https://stackoverflow.com/questions/65944578/how-to-get-nginx-running-in-docker-to-reload-nginx-conf-configuration
2024-04-04 12:36:39 +05:30
Manav Rathi
c177efe79c Add documentation comments 2024-03-18 15:44:00 +05:30
Manav Rathi
f494832bd7 Limit max connections at the nginx level 2024-03-18 15:21:47 +05:30
Manav Rathi
f695c5e0d3 Remove extra newline 2024-03-18 11:06:54 +05:30
Manav Rathi
303b26b95f Tweak the nginx setup 2024-03-18 11:04:31 +05:30
Manav Rathi
a0599f7b33 Outline the nginx approach 2024-03-18 10:25:11 +05:30