Forum: Typo (no subject)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Eamon F. (Guest)
on 2007-07-31 06:48
(Received via mailing list)
Hey guys,
I have a Typo 4.0.3 installation, and I'm running it on a 2.16GHz
Core 2 Duo iMac. It has a database with about 4 months of posts (not
all that big), but it runs veeerrrrryyyyyy slowly. Like, taking about
2-3 minutes just to load the page showing all posts. However, it
seems to work fine on a 1.5GHz PowerBook.
Does anyone have any idea why Typo is running so slowly on the iMac?
Help much appreciated!
Mitch P. (Guest)
on 2007-07-31 06:51
(Received via mailing list)
On Jul 30, 2007, at 22:47 , Eamon F. wrote:

> Does anyone have any idea why Typo is running so slowly on the iMac?

Can you tell us what database you're using, and maybe the resource
usage of your iMac when it seems slow (ram usage, disk activity, cpu
load, etc).

-- Mitch
Eamon F. (Guest)
on 2007-07-31 07:04
(Received via mailing list)
I'm using a MySQL database. And when Typo is acting slow, the "ruby"
process is only using between 0.1-10% of the processor, and about
32MB of RAM.

(BTW, I changed the subject to "Typo Running Very Slowly", because I
forgot to add one before.)
Eamon F. (Guest)
on 2007-07-31 07:23
(Received via mailing list)
Forgot to mention: I'm using "script/server" instead of "typo start",
because I need to be able to run Typo on port 80.
Mitch P. (Guest)
on 2007-07-31 16:45
(Received via mailing list)
On Jul 30, 2007, at 23:22 , Eamon F. wrote:

> Forgot to mention: I'm using "script/server" instead of "typo
> start", because I need to be able to run Typo on port 80.

Not that this will help your performance issues, but you can run
"typo config" to tell it to use port 80, and then you're back to
running like the rest of us ;-) Here's an oldie but a goodie:

http://scottstuff.net/blog/articles/2006/07/23/typ...

First off, when debugging performance issues I always try to
determine where the problem lies, in the following categories:

* disk - is there enough, is there a lot of activity (more than
should be)
* memory - is there enough available, is there excessive swapping
* cpu - is there enough available, is there excessive or heavy load

If you're lucky, one of those three will identify the source of your
problem and you can react accordingly. If there are no issues on
those three points and you're still having performance issues, then
you might want to check your mysqld setup - first by running the test
scripts that should have come with the distribution, and then from
another application that also uses mysqld. Also check your
environment.yml to be sure you are using a socket for your
connections (mysqld will *always* be faster on localhost with sockets).

Another area to check is your versions, what version of ruby, ruby-
mysql, and so on...

Hopefully that is enough for you to find the issue at least, and if
not please report back :-)

-- Mitch, hoping he's helpful
Mitch P. (Guest)
on 2007-07-31 16:52
(Received via mailing list)
On Jul 31, 2007, at 08:43 , Mitch P. wrote:

> Also check your environment.yml to be sure you are using a socket
> for your connections (mysqld will *always* be faster on localhost
> with sockets).

That should read "environment.rb" LOL

-- Mitch, walking away from his laptop for a while
Eamon F. (Guest)
on 2007-07-31 23:40
(Received via mailing list)
Thanks for the info! I tried running "typo config" to tell it to use
port 80, but then it just won't start up. Also, I noticed that when I
run "typo start" instead of "script/server, it's much faster, and
even acceptable. :) So, I guess that eliminates the performance
problem, if only I can figure out how to run it on port 80. Any ideas?
Mitch P. (Guest)
on 2007-08-01 00:50
(Received via mailing list)
Quoting Eamon F. <removed_email_address@domain.invalid>, who spaketh thusly:

> Thanks for the info! I tried running "typo config" to tell it to use
> port 80, but then it just won't start up. Also, I noticed that when I
> run "typo start" instead of "script/server, it's much faster, and  even
> acceptable. :) So, I guess that eliminates the performance  problem, if
> only I can figure out how to run it on port 80. Any ideas?

Ok, so if you are in the top-level directory for your typo site, you
should be able to type:

   typo config . port=80

And that should set your port to 80. If you then type:

   typo start .

Then you should have a typo running on port 80. If there are errors,
maybe posting them here so we can try to see what is happening?

-- Mitch
Eamon F. (Guest)
on 2007-08-01 01:00
(Received via mailing list)
Aha! "Permission denied." I had to run "typo start ." with sudo. I
feel stupid... Thanks for telling me to look at the logs. :P

Thanks for all the help!
Eamon F. (Guest)
on 2007-08-01 01:17
(Received via mailing list)
As a side note, I think I found what's slowing stuff down: it seems
to be the Flickr/Lightbox macro. Could this be because the Flickr api
is slow, or do you think it has something to do with Typo/ Rails?
Mitch P. (Guest)
on 2007-08-01 07:04
(Received via mailing list)
On Jul 31, 2007, at 17:16 , Eamon F. wrote:

> As a side note, I think I found what's slowing stuff down: it seems
> to be the Flickr/Lightbox macro. Could this be because the Flickr api
> is slow, or do you think it has something to do with Typo/ Rails?

I've seen a few blog posts about it, that seems to be the one sidebar
plugin that causes trouble. I'll bet that was the primary source of
your troubles, however getting mongrel running properly didn't hurt ;-)

-- Mitch
Eamon F. (Guest)
on 2007-08-02 07:49
(Received via mailing list)
Yeah, I think I was having trouble with the Flickr sidebar too, until
I removed it. But yeah, getting mongrel running was just a matter of
thinking what I'm doing stupidly. :P
This topic is locked and can not be replied to.