2

First off, my knowledge on rails production is limited so please be gentle.

I'm trying to run my rails app using puma on IIS. I'm making use of httpPlatformHandler. Everything is working great and i can access my app just fine.

After i leave it idle for 20-30 mins and then say refresh the page or click a link, i get the turbolinks loading bar and it takes approx 30 seconds to load. after that its back to working fine.

I'm struggling to understand why turbolinks needs to reload when its been idle for a while? is this a caching thing in ISS? or Puma going to sleep? or something else?

Im really not sure what settings and configs would be useful to post here so please ask and i will provide.

Thanks in advance for any assistance.

Brad
  • 8,044
  • 10
  • 39
  • 50
  • What is your actually question? Is it about Puma going to sleep and how to avoid that (server configuration)? Or about Turbolinks behavior when there are long running requests (JavaScript)? I think you need to clarify this, because both topics are very different and it is very unlikely that an expert in one area also is an expert in the other. – spickermann Nov 20 '16 at 08:03
  • The problem is somewhat that i dont know what is causing the issue so its difficult to pin point the area (puma, javascript etc). – Brad Nov 20 '16 at 15:25

1 Answers1

2

This behavior is not related to your ruby app but rather to IIS configuration. By default IIS recycles applications after 20 idle minutes.

You should set idle timeout to 0 to disable it.

Please refer to How to disable the application pool idle time-out in IIS7?

Community
  • 1
  • 1
Yossi
  • 11,778
  • 2
  • 53
  • 66
  • Thanks for the response. I had my idle timeout set to 0 as that was my first thought but still seemed to happen. I have changed the timeout action to "suspend" rather than "terminate" to see if that helps but given the fact the idle timeout is 0 I cant see this making a difference. I will report back on how it goes. – Brad Nov 20 '16 at 15:24
  • Seems to have done the trick. I had changed the timeout on the wrong app pool (duh!). thanks again. – Brad Nov 22 '16 at 15:20