views:

175

answers:

2

hello friends,
when i am hosting cakePHP and database is in different servers it takes too much time to respond
but when both are in the same server itz performance is good

is there any way to tune performance of cakePHP
keeping database in different server
the performance of database server is good
i already tested another application without cakePHP in the same environment
and it responds quite faster

using cakePHP-1.3

thanks in advance

A: 

What do you mean by "takes too much time to respond"? a few miliseconds, seconds, minutes, hours? What is the average time difference in the query response when db is on same machine vs. another? How much data in bytes/KBs is returned by the query?

PS: Would have added it as a comment to the question, but don't see option to add comments to the questions.

gsharma
A: 

Sounds to me like the two servers are many hops away, meaning the response time for requests is going to be a little high. The only thing I can think of suggesting is to make the database connection persistent to keep the database connection open. This may cut the 6 second response time over three queries down to 2 seconds. Elsewhere in your application (obviously not the login routine) you can use caching to alleviate some of the timing issues.

deizel