Cakephp slow-done on ovh

。_饼干妹妹 提交于 2019-12-11 18:58:54

问题


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 ?


回答1:


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.



来源:https://stackoverflow.com/questions/24270997/cakephp-slow-done-on-ovh

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!