Delay in server response, apache2 codeigniter
Noticing a long delay in server processing time. The application environment is: Apache2
Ubuntu 10.04 PHP 5.3 Codeigniter 2.1 first call after a time causes a significant delay codeigniter profiler is enabled and gives this feedback Loading Time: Base Classes 2.7587 Controller Execution Time ( Home / Index ) 7.2188 Total Execution Time 9.9777 There ar开发者_开发问答e only 2 database active record queries both taking less than a 10th of a second. I am not using any kind of cache. However the same page on refreshing yields this by the codeigniter profiler Loading Time: Base Classes 0.0074 Controller Execution Time ( Home / Index ) 0.1471 Total Execution Time 0.1545From +9 seconds to almost tenth of a second.
This time there are 2 more database queries (codeigniter session fetch and updtate) Is there something i can modify to to reduce the time when a new session is started?CodeIgniter in opposite to Zend is already lighted. Try comment unused libraries.
There is no doubt it's something wrong with your server installation.
I use Ubuntu 11.04 with the last XAMPP and it works great, try reinstalling your server.
what kind of database driver do you use? are they differs with the other page? cause i have faced this problem too. i use mysql database server version 5.X.X. i use CI 2.0.3
this is the report from the profiler
using driver mysql
Loading Time: Base Classes 0.4485 Controller Execution Time ( Single Import / Get Dpt Count By Region ) 0.1042 Total Execution Time 0.5531
using driver mysqli
Loading Time: Base Classes 1.4436 Controller Execution Time ( Single Import / Get Dpt Count By Region ) 1.1049 Total Execution Time 2.5488
so i suggest you to only use mysql driver, i still don't any clue(don't have time to debug :D) if there is a problem with CI when try to load mysqli driver cause the load base classes significant than the other one(mysql). i hope this can help you. :)
精彩评论