New app - Welcome loads fine but controller slow


#1

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?


#2

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.


#3

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.


#4

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


#5

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.


#6

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.