Using: Rails 3.0.3. Webhost: Heroku.com. 2 dynos & 0 worker.
I am a bit of a beginner using Rails and just released my first project. The users are experiencing intermittent problems that, according to the users, are “I get a blank screen with a message that the page needs to reload”. Unfortunately I cannot get it better explained than that (one way-communication channel from the users).
I also get this error in the logs:
2011-11-09T19:00:12+00:00 heroku[web.1]: Process running mem=598M(116.8%)
2011-11-09T19:00:12+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
which seems pretty straightforward.
I have about 4 000 visitors a day and about 10 000 page views.
Edit: I also have New Relic and Exception notifier installed. I get a lot of “Execution expired” problems.
What I would like to know now is:
- How can I find these intermittent errors (I have no timestamps). What should I search for in the logs (what string)?
- Do memory problems cause the web browser to crash and reload (or something similar)? Or, is that related to java-problems?
- Most importantly: How can I test my application to see where it is the most memory intensive? I know I have not made it with perfect coding so I need to find the bad parts.
Once again, this is my first project so the solutions might be easy but please help me out.
Install the New Relic Standard addon – that will give you insight into your application and what’s going on. The ‘Dynos’ tab will show you memory utilisation of your application, it sounds like an awfully high memory utilisation for the level of traffic you’re reporting but it depends on your application – if you’re seeing memory errors in the log then performance will be suffering see http://devcenter.heroku.com/articles/error-codes#r14__memory_quota_exceeded
Are you using any kind of error handling? You could install the Airbrake addon so you get notification of errors or use the Exception Notifier gem which will email you errors as they occur. Once you have these in place you’ll know what’s occuring – whether it’s in the application or if you don’t receive any then it’s outside factors, like the visitors internet connection etc.