Thanks jmn2k1 and djogo for the new answers here..

I'm really using IP Address instead hostname for database connection..

Guys, I Haven't tried the proposed solutions yet, but this week I'll try
them all.. (these days I'm running against time to put some things in order
here.. haha)..

Thanks for the help.

Thiago Elias.


2010/8/13 djogo <djogopat...@gmail.com>

> jmn2k1, sometimes even the network routing messes with database access
> speed... We had a problem in which every request passed by the
> firewall, even to our own servers! The firewall couldn't handle the
> traffic, therefore everything (internet and intranet access) was so
> slow.
>
>
> On Aug 13, 11:17 am, jmn2k1 <jmn...@gmail.com> wrote:
> > Not necessarily your case but once I had a similar problem, it turns
> > out I was using a hostname for the database server that need to do a
> > DNS checkout and hence slow the app down. If you're using the ip then
> > this is not the case.
> >
> > On Aug 12, 10:14 am, Thiago Elias <thiagopt...@gmail.com> wrote:
> >
> > > Hey Guys..
> >
> > > Thanks everyone for the answers.. I'll try them all here today, and
> I'll
> > > post the results soon as possible..
> >
> > > 2010/8/12 djogo <djogopat...@gmail.com>
> >
> > > > Hi Thiago,
> >
> > > > I would try to replicate the entire system (lampp + your app +
> > > > database) in other server and check whether the "slowness" is due to
> > > > the server or not. You may also replicate a legacy PHP app, as you
> > > > call it, to check if it works well too. This replicated server will
> > > > allow you to test other experiments without jeopardizing your real
> > > > production data.
> >
> > > > If the performance in the replicated server is equivalent to your
> > > > original one, check if its something in the cakephp lib. Create a
> > > > controller that doesn't use any models at all. If it's also slow,
> than
> > > > the problem is something about your cake, or its configuration. If
> > > > it's not, then it's probably your database.
> >
> > > > Then you can start thinking about database optimization. Is all
> > > > queries slow? Try a simple "SELECT 1 FROM DUAL" in the legacy PHP and
> > > > in cakePHP. how many milisseconds each one takes (test both on the
> > > > browser)? Is AppController->beforeFilter doing something that may be
> > > > slowing down your queries?
> >
> > > > Turn debug to 2 and for each query that it reports, check how much
> > > > time is it taking (it's right beside the query name). Try to run the
> > > > same query on the database directly and check if the timing is
> > > > compatible.
> >
> > > > When my apps turn slow, I always think of the DB. Sometimes, it's
> just
> > > > a matter of creating the right indexes - for instance, if you run
> > > > "SELECT marafo_id, count(*) from naosei group by marafo_id", it'll be
> > > > really slow when you have lots (>100K) of rows and the grouped column
> > > > is not indexed. A simple "CREATE INDEX index_naosei_marafo_id ON
> > > > naosei (marafo_id);" would solve this problem.
> >
> > > > Well, keep us all informed about these results. I'm very interested
> > > > because every once in a while I (and may I add, everybody =]) run
> into
> > > > this kind of problem too.
> >
> > > > dfcp
> >
> > > > On 11 ago, 22:29, Thiago Elias <thiagopt...@gmail.com> wrote:
> > > > > Hi All,
> >
> > > > > Since two or three months ago (more or less), I'm experiencing some
> > > > problems
> > > > > involving CakePHP.
> >
> > > > > In the past, our application was using a local database connection,
> and
> > > > > performance was really nice and acceptable. Some months ago, we had
> to
> > > > > migrate the application to another server, separating the Data and
> the
> > > > Apps.
> >
> > > > > After this change, I've lost performance in my cake App. Each
> request
> > > > takes
> > > > > around 10 ~ 15 seconds, and before, was 2 ~ 3,5 secs.
> > > > > The interesting thing is: The other legacy PHP Apps are 100% fast,
> and
> > > > even
> > > > > other cakeAPPs are fast too, but the difference is: My main cake
> app (the
> > > > > one that lost performance) have 80 innoDB Tables and 20 views.
> (used to
> > > > link
> > > > > to another databases).
> >
> > > > > I'm using CakePHP 1.2.7, PHP 5.2. And in the Database Server, MySQL
> > > > Server
> > > > > 5.1.
> > > > > Our network infrastructure is really fast, and ping response
> between
> > > > servers
> > > > > is really nice.
> >
> > > > > Does anyone knows why I'm losing performance just in this App when
> > > > connected
> > > > > to a remote server ?! I'm using CakePHP Debug, and ~85% of the time
> spent
> > > > in
> > > > > the request is lost in the CORE, and not in the app. (The core is
> the
> > > > same
> > > > > of the other cakeApps..)
> >
> > > > > Please help-me (and sorry for my bad english).
> >
> > > > > Thiago Elias
> >
> > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> others
> > > > with their CakePHP related questions.
> >
> > > > You received this message because you are subscribed to the Google
> Groups
> > > > "CakePHP" group.
> > > > To post to this group, send email to cake-php@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.com>
> <cake-php%2bunsubscr...@googlegroups.com<cake-php%252bunsubscr...@googlegroups.com>>For
> more options, visit this group at
> > > >http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.com>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to