Skip to content

Commit

Permalink
Add FAQ on memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
faph committed Apr 11, 2024
1 parent 90e6c30 commit e44d7a1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ For more details see :ref:`deployment:Configuring Gunicorn workers`.
My model is leaking memory, how do I address that?
--------------------------------------------------

If the memory leak is outside your control, one approach would be to periodically restart the webserver workers.

For example, when using Gunicorn, it is possible to specify a maximum number of HTTP requests (`max_requests`) after which a given worker should be restarted.
Gunicorn additionally allows a random offset (`max_requests_jitter`) to be added such that worker restarts are staggered.

For more details see `Gunicorn settings documentation <https://docs.gunicorn.org/en/stable/settings.html#max-requests>`_.


How do I invoke my model using a data stream from my favourite message queue system?
------------------------------------------------------------------------------------

0 comments on commit e44d7a1

Please sign in to comment.