Open ff-dh opened 6 days ago
Yes, this probably does relate to using stream_template
.
We currently run gunicorn with 2 synchronous workers: https://github.com/FullFact/health-misinfo-shared/blob/ae033e995f323e5d5ed3207e350c0980b593d255/Dockerfile#L21
We could up the number of workers, and/or make them async.
If multiple URLs are submitted at roughly the same time, the later submissions take longer to render while the load is increased.
Example (with one worker):
/post
route is called, which returns astream_template
.I thought the database might've been blocking these but after some db changes for throughput and reduced blocking this particular issue wasn't resolved. It could be a
stream_template
upper limit but the docs don't speak on anything like that.