Skip to content
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

Excessive memory usage on Heroku #65

Open
wemmick opened this issue Jun 29, 2018 · 7 comments
Open

Excessive memory usage on Heroku #65

wemmick opened this issue Jun 29, 2018 · 7 comments

Comments

@wemmick
Copy link

wemmick commented Jun 29, 2018

I got this working on Heroku (thanks for the great gem!) However, now that it's running, it tends to eat up a ton of memory. It seems like a gem that's doing something relatively straightforward like this shouldn't take up 100MB+ of memory on Heroku, so perhaps there's some issue with it.

I use Scout on Heroku to check memory usage, and this gem is using more memory than any other page in my app by far, so it'd be awesome if you could figure out what's going on. That said, the dump from Scout didn't help me much in figuring out what was up - here's what it tells me:

Router/Rails
1 call
100%
exception_handler/exceptions/show
1 call
0%
...
Middleware
1 call
0%
Controller
1 call
0%
RedirectRule#find
SQL
1 call
0%

As you can see, "Router/Rails" appears to be the culprit, but I'm not sure what to do about that. None of my other pages see this kind of memory increase in the Router. Any ideas? Let me know if you need more info.

@wemmick wemmick changed the title Excessive memory usage Excessive memory usage on Heroku Jun 29, 2018
@richpeck
Copy link
Owner

richpeck commented Jun 29, 2018 via email

@wemmick
Copy link
Author

wemmick commented Jul 3, 2018

This is the trace I get from Scout on Heroku - does it help? It looks like the bloat is all in the Router, but I'm not sure what can be done about that.

fireshot capture 18 - exceptionhandler__exceptionscontroller_ - https___apm scoutapp com_apps_6280

@richpeck
Copy link
Owner

richpeck commented Jul 3, 2018

Many thanks, will investigate this myself - not sure why it would be eating memory like that.

Does the app have any other memory leaks or is it just with ExceptionHandler?

@wemmick
Copy link
Author

wemmick commented Jul 7, 2018

As far as I can tell, it's just ExceptionHandler. I haven't seen memory usage at that scale on any other pages, and I've never seen significant usage coming from the router. Any help would be much appreciated!

@richpeck
Copy link
Owner

richpeck commented Jul 7, 2018

Got the same results on Heroku for one of our apps - looking at the issue but still unsure as to what's causing it.

@wemmick
Copy link
Author

wemmick commented Jul 31, 2018

Hi Rich, any insights on this?

@richpeck
Copy link
Owner

Still looking - sorry for the late response; for some reason, the email response didn't register as a comment!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants