Closed robertknight closed 4 months ago
After deploying this, the servers did in fact reach their memory limit, so the calculation here was not correct. https://hypothes-is.slack.com/archives/C074BUPEG/p1721376489716019. For now we've just increased the instance size from t3.medium to t3.large to see what the actual memory usage peaks at.
In production workers have a typical RSS of ~90MB, but of that only 45-50MB is private to the process. With the previous RSS limits, production was effectively capped at 17 workers (1536 / 90 ~= 17). Additionally the configuration assumed 2GB memory per host, but the configuration was subsequently changed to use t3.medium with 4GB.
This commit raises the cap on the number of workers and removes the fixed memory limits, which were outdated. This should allow the service to scale up workers better to meet bursts of demand.
See https://github.com/hypothesis/viahtml/issues/696