0

I have a large webb app of which I have recently been working hard to reduce load times. I have two controllers Generator (some 20.000 items) and Product (some 1.500 items) that have been slow for a while but I have worked with indexes and smart queries. On my dev app the app response time is about 500 ms.

From time to time I still get RequestTimeOut on the app and I need help trouble shooting this error. I understand what it means (a request has taken too much time) and I have installed the 'rack-timeout' gem and set it to 15 seconds (which works fine).

I have gone through the entire app (and especially the two slowest: Generator & Product) in search for time to save. I have had some issues with caching that I am currently trying to fix (caching would help quite a bit).

It seems that these timeouts happens mostly when bots (Yandex.ru especially) spiders through my site and especially goes through one generator after another. They may not be very slow any more but loading so many after another causes a lot of requests.

Now I am out of ideas and need some help in order to know what and how to continue my trouble shooting:

  1. Is there anything else outside of response time that cause this
    error? E.g. memory leakage or something? Or is it just a matter of lots of requests on slow controllers?
  2. I haven't been able to test it on my development platform. Is
    there a way to benchmark and see how the app would handle requests like from the bots? I seem to remember there was an "Apache-thing" one could use to simulate traffic like this.
  3. Any other ways of looking at the problem or trouble shoot this
    issue from a high level point of view? Any ideas and thoughts are welcome!
Ibraheem Zafar
  • 346
  • 1
  • 9
Christoffer
  • 2,271
  • 3
  • 26
  • 57
  • You might want to find out where you are spending the most time and add some caching if its database IO that is your bottleneck (which is pretty common). Take a look at rack-mini-profiler and stackprof. – jfornoff Aug 21 '15 at 14:13
  • Also Aaron Patterson has some pretty sweet talks over on Youtube for how to find performance bottlenecks, he's pretty much god level at that. – jfornoff Aug 21 '15 at 14:14
  • Thanks guys, I will try it out! – Christoffer Aug 28 '15 at 07:12

0 Answers0