Application running very slowly on server's internal ip and fast on localhost

Dear friends,

I am running an Yii application on a Linux server (Centos 7) with Postgresql but I am experiencing a tricky problem: My application runs fast only when I run in browser using http:\\localhost or http:\\ and it runs very slowly using server internal IP (http:\\ in my case) or any other workstation of my network.

Seems like a 5-7 seconds lag at every operation of tcp stack… I think localhost does not use tcp stack.

The Database Configuration is:


return CMap::mergeArray(



            'components' =&gt; array(

        'db' =&gt; array(

            'connectionString' =&gt; 'pgsql:host=localhost;port=5432;dbname=f3producoes',

            'emulatePrepare'   =&gt; true,

            'username'         =&gt; 'hjshuy',

            'password'         =&gt; 'iiuoiu',

            'charset'          =&gt; 'utf8'






Thanks in advance for any help.


Try using a memcache for decreasing the query hits on your database