J. Bakshi wrote: > Something different !!! > You are right, the cgi is not the all_in_all culprit. > > I have done further investigation and found dedicated mysql server > introduces latency when remote mysql user connect with it. Hence > added > > skip-name-resolve under [mysqld] > And now the sites become faster.
When you connect to the mysql database server the server will look up the connecting IP address in DNS in order to be able to log the connection's name. If there is a delay there connecting to the local server then that indicates something unusual about how you have configured your mysql client server. Are you missing a "localhost" line from /etc/hosts? I think that is your problem. 127.0.0.1 localhost You should also have an entry there for your current hostname both fully qualified and as a short hostname. 127.0.1.1 foo.example.com foo Mysql treats connecting to localhost specially. If connecting to localhost it will use a unix-domain socket. If connecting to other hosts it will use a tcp socket. If connecting locally through a unix domain socket then the connection should be very fast. If forcing it to go to a tcp connection it will be slightly slower, and the server will do a dns lookup of the IP address. > But still there is a huge delay when accessing vievc and cgi is > involved here. The prime issue has been solved. Now I'm focused on > cgi That is very likely a related problem. If you don't have DNS set up properly for your ip address and hostname then there will be many programs that will behave similarly and slow or perhaps even failing. Bob
signature.asc
Description: Digital signature