简体   繁体   English

php codeigniter缓慢的初始加载

[英]php codeigniter slow initial load

There is a site. 有一个网站。 Everything was just ok, but suddenly its working a bit strange: http://gtmetrix.com/reports/bienestarenelhogar.com/bSruWlXF (click the timeline) 一切都还好,但是突然它的工作有点奇怪: http : //gtmetrix.com/reports/bienestarenelhogar.com/bSruWlXF (单击时间线)

It's usual apache+php+mysql 这是通常的apache + php + mysql

The initial request takes 15 seconds. 初始请求需要15秒。 Its using codeigniter 2.1.0. 它使用codeigniter 2.1.0。 I have suspicion that the igniter is causing the problem, since the other php pages are just ok. 我怀疑点火器引起了这个问题,因为其他的php页面都还可以。

I currently try to get to logs, but I don't have root and can't sudo on the server. 我目前尝试获取日志,但是我没有root用户,因此无法在服务器上使用sudo。 Any other way to diagnose that? 还有其他诊断方法吗?

(I'm not a php guy, I'm all about java) (我不是php专家,我全都关于Java)

Any help is appreciated. 任何帮助表示赞赏。

by enabling caching in your codeigniter app, you can boost up your app, much better. 通过在您的codeigniter应用程序中启用缓存,您可以更好地增强您的应用程序。 just need to append some code in project's .htaccess file. 只需在项目的.htaccess文件中附加一些代码即可。

ExpiresActive On

<Directory "/path/to/public_html/files">
    Options FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
    ExpiresDefault A300
    <FilesMatch "\.html$">
        Expires A86400
    </FilesMatch>
    <FilesMatch "\.(gif|jpg|png|js|css)$">
        Expires A2592000
    </FilesMatch>
</Directory>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM