I split the timeout rack so that I could add some features, namely, catch timeout incidents, log them, and send 503.
Here is my fork .
Here's the Rack / Middleware app in my plug .
The behavior is the same as expected. However, since the deployment, the memory capacity of my application has been growing and constantly growing until I restart it. As he grows, his behavior is correct, and his performance appears to be normal.
When I first noticed this, I thought that this could be due to the fact that in cases where the request died, some threads / memory constantly hung. This line of experiments led to this patch . Indeed, in my local tests, without this patch memory, it grows steadily when the application gets (programmed) to timeout requests, and with the patch the memory remains low and normal.
So, it seemed to me that I fixed the problem. But I didn’t do it - the memory on my production application is still growing. (I did not try to test my application locally in production mode - I will do this further).
What could cause a memory leak in my Rack app?
source
share