How to debug random timeout :: Error: execution timed out

We use Rails 2.3.5 and experience a seemingly random error Timeout :: Error: Expired. The errors reported by Hoptoad are not always found in any particular controller and are displayed everywhere from user sessions to account settings for some of our main functional controllers.

The vast majority of requests do not time out, but they are enough to cause concern.

This is normal? If so, what are some things to look to reduce origin? If not, does anyone encounter this and some common problems that might cause an error like this.

+4
source share
1 answer

This is normal for timeout requests if your server is running under heavy load. You should see if the timeouts are consistent with long-term SQL queries or any other time-consuming activity. Often you can reduce latency by upgrading your hardware or optimizing your code as a whole. If you cannot upgrade your equipment, try optimizing the longest and most frequently used actions.

+1
source

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


All Articles