Open
Conversation
This reverts commit 7ac617e.
…vent objects generated in the before hook of Grape::Middleware::Lograge pushes my garbage collection and object allocations through the roof, severly degenerating application performance, and doesn't seem to actually be necessary.
cycle also creates a huge memory leak that is never collected, running a system out of free memory and crashing on disk swaps.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ActiveSupport::Notifications::Event object will blow up sometimes when the start time passed from ActiveSupport::Notifications.subscribe('sql.active_record') is nil. Fixing that problem gave rise to something like a memory leak as the Event objects proliferate with every request, while doing very little. We could simply make the calculation it performs ourselves and greatly improve performance.
Before this change in my app under load the performance severely degraded very quickly (the load average on the box rose to over 20). The spikes on the right here are when the box was under load, flattening out when I hit the emergency breaks on our load tests:
After the change under the same load it faired much much better (the spikes the left are the deployment):