How can I start to diagnose a bad Rails application running on mysql?

I took over the maintenance of a Rails 2.3.4 application running on ruby ​​1.8.7 and mysql. The application is a modified Radiant CMS 0.8.1 website with user extensions. Currently, the production environment experiences frequent periods of slow and sometimes non-responsive. During this time, I noticed that using the mysql processor jumps over the roof. The website has an international audience, and at the time of its creation, the scaling of the site was not taken into account. Currently, the user base is about 4600 and is growing. What are some initial steps I can take to diagnose poor performance in both Rails and mysql?

Thanks Mike

+3
source share
2 answers

Until I am configured for Rails, I would recommend using the MySQL slow query log and keep track of them back to requests sent by the Rails application (check log/production.log).

+3
source

In the last place where I worked, a tool called query_reviewer was used. This is a Rails plugin that analyzes each request in development mode and gives you warnings in the user interface, letting you know any possible problems. I liked it because you did not have to switch between your application and the log or other testing tools.

https://github.com/dsboulder/query_reviewer

New Relic - , . , SQL, .

http://newrelic.com/

+1

Source: https://habr.com/ru/post/1786946/


All Articles