Resolve "Memory leak if the table contains a `link_row` field"
Closes #418 (closed)
How to test
One of the ways I tested this was by using the docker stats
command. Do the following before checking out this branch. Start youryour development environment, you change your DEBUG = False
and start the backend server with gunicorn gunicorn --workers=3 -b 0.0.0.0:8000 -k uvicorn.workers.UvicornWorker baserow.config.asgi:application
. Run the docker stats
command in a separate terminal tab/window. You should see a stable memory usage in the backend container.
Create a table that has a link_row
field relation with another table. The memory leak happens during the when generating a table model (Table.get_model
) that has a link_row
field. The GridViewView
endpoint for example uses that method to generate a model. Start hitting this endpoint. Every time you make a request you should see the memory usage increase in the docker stats
.
Once you have reproduced the issue, you can checkout this branch and see if the memory usage still increases. Don't forget to restart gunicorn. Sometimes it looks like the memory increases after making a request, but that stops after a few MB.