Sometimes I have to hot patch production code due to an error/bug (mostly in a single file) but I have set eager_load
and cache_classes
to true in the development environment. Because of these two, the server takes around 2 and half minutes to load and the same goes for a hot patch.
My end goal is to reduce server load time. One way is to add 'require: false' for gems which are not required when the application starts and then load them later when required. But is it possible reload only the updated file instead of restarting the whole application?
I am using an nginx free server (Enterprise nginx version could be a solution which provides zero downtime but is it possible in the version?)