2021年1月29日星期五

How to determine the cause of a delay before an action is hit in my Rails app?

I've come to a dead-end with my troubleshooting, and I'm really hoping someone can help.

I'm using rack-mini-profiler to help locate a potential memory leak in my Rails website. I narrowed it down to the method that is being called.

High-level profile: rack-mini-profiler high-level

SQL profile: rack-mini-profiler results

In the SQL profile picture, notice the start times of the query just above and just below the gray bar have a difference of 1037ms. That is the delay I am noticing, and it grows until I restart the application.

When running this locally, I can monitor the terminal. When that method is requested, there is just that 1 second delay, and then it executes. No queries or commands show up in the terminal during that delay.

Does anyone have any ideas as to how I can figure out what is causing this delay?

I'm using Ruby 2.2.0 with Rails 4.1.6.

Thanks!!

https://stackoverflow.com/questions/65964248/how-to-determine-the-cause-of-a-delay-before-an-action-is-hit-in-my-rails-app January 30, 2021 at 11:06AM

没有评论:

发表评论