...
- Are the objects instantiated referenced in an array, other objects via associations
- Are unbound collections loaded via has_many associations
- Can objects processing be batched (look at ActiveRecord find_each and find_in_batches methods)
- Are large files loaded (CSV, JSON) and parsed in memory
Errors
Your Web Application returns errors on invalid requests, as this is a normal behaviour, it still needs to be monitored. By default, if the error rate is above 5%, an alert will be triggered. If your application is correctly configured, this threshold can be lowered.
Improve the configuration
Ignore ping URLs
For a better reliability of the error rate, you should avoid tracking the ping URLs of your application. This can be achieve by specifying the following configuration in your newrelic.yml file
Code Block |
---|
rules:
ignore_url_regexes: ["^/ping", "^/health_check", "^/version"] |
Ignore scanning requests
Hosting a publicly accessible application means that it will be scanned by external scripts to find vulnerabilities. You can exclude requests to any scripts with extensions php, asp, cgi etc...
Address errors
It is a good practice to periodically go through the errors captured by NewRelic even if it stays below the 5% error rate.
The complete stack trace is given to help you find the parts of the code that cause errors.