Cakephp在ovh慢下来 [英] Cakephp slow-done on ovh

查看:163
本文介绍了Cakephp在ovh慢下来的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在我的ovh服务器上部署我的CakePhp网站时发现了一个奇怪的行为:响应时间似乎确定(我有我的网页在不到一分钟的时间),但浏览器似乎重新加载一些东西。



查看firefox web开发人员工具,我看到这是html页面接收,时间恰好5秒。奇怪的是,我可以看到在这5秒内我的网页的所有内容。



我测试的html页面是4ko。如果我尝试进行硬刷新(通过忽略firefox缓存),所有的图像,css,js,fonts ...在html页面被收到之前加载。



我没有这个问题,当我在我的电脑上运行的网站,我认为它的CakePhp相关,因为我可以访问一个html测试页没有这个问题。



它似乎没有链接到一个特定的布局/页面:每一个页面和布局,我尝试导致相同的效果。



另一个有趣的点:一些页面有pingdom和5秒的接收时间不出现。



有没有人遇到类似的问题?

解决方案

这个问题与PHP-FPM优化有关。



要停用PHP-FPM,您必须上传一个.ovhconfig文件文件,其中包含以下内容:

  app.engine = phpcgi 
app.engine.version = AUTO



我将尝试使用CakePhp和PHP-FPM并编辑,如果我有一个解决方案。


I observed a strange behavior when I deployed my CakePhp website on my ovh server (mutualized):

Response time seem to be ok (I have the webpage I asked for in less than a minute), but the browser seems to load again something.

Looking with the firefox web developer tools I see this is the html page reception that took every time exactly 5 seconds. The strange thing is that I can see all the content of my webpage during those 5 seconds.

The html page I've tested is 4ko. If I try to do a hard refresh (by ignoring firefox cache), all the images, css, js, fonts ... are loaded before the html page has been received.

I don't have this problem when I run the website on my computer, and I think its CakePhp related because I can access a html test page without this problem.

It doesn't seem to be linked to a specific layout / page : every page and layout I tried cause the same effects.

An other interesting point : I have tested some pages with pingdom and the 5 seconds reception time doesn't appear.

Does anyone experienced a similar issue ?

解决方案

The problem was related to PHP-FPM optimization activated by default in OVH mutualized servers since 2014. I don't know why the problem appeared in my browser and not with pingdom, I will investigate further and edit if I have more informations.

To desactivate PHP-FPM you have to upload a .ovhconfig file at the root of your server with the following content :

app.engine=phpcgi
app.engine.version=AUTO

I will try to use both CakePhp and PHP-FPM and edit if I have a solution.

这篇关于Cakephp在ovh慢下来的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆