# New app - Welcome loads fine but controller slow

**URL:** <https://www.ruby-forum.com/t/new-app-welcome-loads-fine-but-controller-slow/87850>\
**Category:** Rails\
**Created:** [March 6, 2007, 12:00pm UTC](https://www.ruby-forum.com/t/new-app-welcome-loads-fine-but-controller-slow/87850 "2007-03-06T12:00:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![draklava](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c4cdca/32.png) [@draklava](https://www.ruby-forum.com/u/draklava)\
**Post date:** [March 6, 2007, 12:00pm UTC](https://www.ruby-forum.com/t/new-app-welcome-loads-fine-but-controller-slow/87850/1 "2007-03-06T12:00:20Z")

</div>

I am running RoR 1.2 on Fedora 6 in VMWare.  
I create a new app and fire up WEBrick and connect from my windows host  
over a host-only VMWare interface and it connects fine.

Now I create a test controller and view and connect. It takes anywhere  
from 30 seconds to a couple minutes to load the simple “hello” style  
test page.

If I copy the whole directory to my windows box and run WEBbrick and  
connect to localhost it loads fine.

I have an Apache/PHP setup on the VMWare using the same connection (to  
port 80 not 3000 but similar) and it works fine.

Any ideas on why the “Welcome aboard” page loads fine but a simple  
controller would take so long to load?

---

<div class="post-metadata">

**Author:** ![draklava](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c4cdca/32.png) [@draklava](https://www.ruby-forum.com/u/draklava)\
**Post date:** [March 6, 2007, 1:34pm UTC](https://www.ruby-forum.com/t/new-app-welcome-loads-fine-but-controller-slow/87850/2 "2007-03-06T13:34:41Z")

</div>

Jk Jk wrote:

> I have an Apache/PHP setup on the VMWare using the same connection (to  
> port 80 not 3000 but similar) and it works fine.
> 
> Any ideas on why the “Welcome aboard” page loads fine but a simple  
> controller would take so long to load?

Is your image swapping when it’s running Rails? If you reload the  
controller URL after the first time it finishes loading does it still  
take a long time to load?

–  
Michael W.

---

<div class="post-metadata">

**Author:** ![draklava](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c4cdca/32.png) [@draklava](https://www.ruby-forum.com/u/draklava)\
**Post date:** [March 6, 2007, 1:46pm UTC](https://www.ruby-forum.com/t/new-app-welcome-loads-fine-but-controller-slow/87850/3 "2007-03-06T13:46:43Z")

</div>

Michael W. wrote:

> Is your image swapping when it’s running Rails? If you reload the  
> controller URL after the first time it finishes loading does it still  
> take a long time to load?

thanks Michael

It takes a long time to load no matter how many times I refresh. I can  
also stop and start WEBrick and it makes no difference. Controller loads  
slow.

---

<div class="post-metadata">

**Author:** ![draklava](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c4cdca/32.png) [@draklava](https://www.ruby-forum.com/u/draklava)\
**Post date:** [March 6, 2007, 1:52pm UTC](https://www.ruby-forum.com/t/new-app-welcome-loads-fine-but-controller-slow/87850/4 "2007-03-06T13:52:05Z")

</div>

Jk Jk wrote:

> I am running RoR 1.2 on Fedora 6 in VMWare.  
> I create a new app and fire up WEBrick and connect from my windows host  
> over a host-only VMWare interface and it connects fine.
> 
> Now I create a test controller and view and connect. It takes anywhere  
> from 30 seconds to a couple minutes to load the simple “hello” style  
> test page.
> 
> If I copy the whole directory to my windows box and run WEBbrick and  
> connect to localhost it loads fine.
> 
> I have an Apache/PHP setup on the VMWare using the same connection (to  
> port 80 not 3000 but similar) and it works fine.
> 
> Any ideas on why the “Welcome aboard” page loads fine but a simple  
> controller would take so long to load?

Do you have the VMWare image set to run at high priority when it is  
being used? It’s recommended to set vmware images to high/low for  
performance (look on the setting property pages for the VM). Also, are  
you using MSSQL? When I tried to setup my first RoR with MSSQL, I had  
slow performance when using the ODBC method. I switched to using ADO  
for database access, and that improved performance greatly.

HTH,  
Kevin

---

<div class="post-metadata">

**Author:** ![draklava](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c4cdca/32.png) [@draklava](https://www.ruby-forum.com/u/draklava)\
**Post date:** [March 6, 2007, 2:07pm UTC](https://www.ruby-forum.com/t/new-app-welcome-loads-fine-but-controller-slow/87850/5 "2007-03-06T14:07:15Z")

</div>

Kevin T. wrote:

> Do you have the VMWare image set to run at high priority when it is  
> being used? It’s recommended to set vmware images to high/low for

Hmmm - I just switched the VMWare setting “Priority-\>Input Grabbed” from  
normal to high and it appears to make a huge difference.

I think this may have been the problem.

Thanks all for your suggestions.

---

<div class="post-metadata">

**Author:** ![draklava](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c4cdca/32.png) [@draklava](https://www.ruby-forum.com/u/draklava)\
**Post date:** [March 6, 2007, 1:59pm UTC](https://www.ruby-forum.com/t/new-app-welcome-loads-fine-but-controller-slow/87850/6 "2007-03-06T13:59:50Z")

</div>

Jk Jk wrote:

> Michael W. wrote:
> 
> > Is your image swapping when it’s running Rails? If you reload the  
> > controller URL after the first time it finishes loading does it still  
> > take a long time to load?
> 
> thanks Michael
> 
> It takes a long time to load no matter how many times I refresh. I can  
> also stop and start WEBrick and it makes no difference. Controller loads  
> slow.

If you monitor the RAM and swap usage with something like “top” do you  
see it chewing up swap space? What’s taking up most of the CPU cycles  
while it’s trying to load the page through the controller?

If you view the development.log file what are the controller stats you  
are seeing? E.g. is it spending most of its time rendering the view or  
accessing the DB?

–  
Michael W.
