-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🤗 [Question]: Potential memory leak? #2470
Comments
fasthttp and fiber are built to preserve and reuse the request and response capsules for the next loop using the concept of sync pools this saves allocations and makes the application faster how big is the json you want to write away? there is the possibility to make some settings in fasthttp which might reduce the pool or memory usage |
The issue isn't that I am writing large json data in a single request - the issue is that memory is not being freed over time so the RSS grows to 1.6GB over a period of 8-10 hours. The example I gave is just 1 route that causes a memory leak. I am going to try this and see what happens `
|
@damianham I'm repeatedly |
Question Description
how can I ensure all memory is freed after a request has been served. My API server has a memory leak that ultimately gets the process killed as the server runs out of memory. The memory leak is in fiber.Ctx.JSON
In all my API requests I return a JSON map from the handler, see the example snippet.
Code Snippet (optional)
Checklist:
The text was updated successfully, but these errors were encountered: