Rails 3.2.8 production site 10x slower than development site

I have a live production site (production mode) running alongside a test site running in development mode. They both run on the same machine, using Rails 3.2.8. If I request a page on the production site, it takes approximately 4-5 seconds to load the page. If I request the same page on the test site it takes (only) about 0.5 seconds. A major difference of 10x. Always thought that production would be faster than development :frowning: If I reload the page on the production site the load times stay the same.

This behaviour is with Apache 2 + Phusion Passenger, Litespeed and even Webbrick. So it most probably is something Rails related. But I can not put my finger on it. Since the production log tell me the pages are rendered quickly, but it takes a hell of a lot of time before the page appears on my screen.

What is going on? How can I debug this problem? Because as of now the production site is way too slow even without any traffic.

Kind regards,

Nick

I have a live production site (production mode) running alongside a test site running in development mode. They both run on the same machine, using Rails 3.2.8. If I request a page on the production site, it takes approximately 4-5 seconds to load the page. If I request the same page on the test site it takes (only) about 0.5 seconds. A major difference of 10x. Always thought that production would be faster than development :frowning: If I reload the page on the production site the load times stay the same.

This behaviour is with Apache 2 + Phusion Passenger, Litespeed and even Webbrick. So it most probably is something Rails related. But I can not put my finger on it. Since the production log tell me the pages are rendered quickly, but it takes a hell of a lot of time before the page appears on my screen.

What is going on? How can I debug this problem? Because as of now the production site is way too slow even without any traffic.

The differences between the two modes are the differences between the files in config/environments. You could incrementally move from one mode to the other to find which change is the one causing the problem.

Colin