2016-06-18 40 views
0

我有一個問題Symfony2共享主機不良表現可能緩存?

我使用的默認配置Symfony2的app.php

> <?php 
> 
> use Symfony\Component\ClassLoader\ApcClassLoader; use 
> Symfony\Component\HttpFoundation\Request; 
> 
> $loader = require_once __DIR__.'/../app/bootstrap.php.cache'; 
> 
> // Enable APC for autoloading to improve performance. // You should 
> change the ApcClassLoader first argument to a unique prefix // in 
> order to prevent cache key conflicts with other applications // also 
> using APC. /* $apcLoader = new ApcClassLoader(sha1(__FILE__), 
> $loader); $loader->unregister(); $apcLoader->register(true); 
> */ 
> 
> require_once __DIR__.'/../app/AppKernel.php'; //require_once 
> __DIR__.'/../app/AppCache.php'; 
> 
> $kernel = new AppKernel('prod', false); $kernel->loadClassCache(); 
> //$kernel = new AppCache($kernel); 
> 
> // When using the HttpCache, you need to call the method in your front 
> controller instead of relying on the configuration parameter 
> //Request::enableHttpMethodParameterOverride(); $request = 
> Request::createFromGlobals(); $response = $kernel->handle($request); 
> $response->send(); $kernel->terminate($request, $response);` 

現在我的問題:

我有地方阿帕奇誰在200ms的渲染一些模板中的Symfony 2項目-250毫秒prod。 在後臺沒有數據庫。 現在我的問題是,如果我在webhost請求相同的頁面,我有請求時間從1秒到8秒。 。

我只是有一些佈局樹枝,然後將內容諧音在

我不知道爲什麼我有這麼高的要求時間 這裏是一個reques頭示例:

General: Request URL:http://####/## 
Request Method:GET 
Status Code:200 OK 
Remote Address:#### 

Response Headers: view source 
Cache-Control:no-cache 
Connection:Keep-Alive 
Content-Type:text/html; charset=UTF-8 Date:Sat, 18 Jun 2016 14:41:39 GMT 
Keep-Alive:timeout=2, max=98 
Server:Apache 
Transfer-Encoding:chunked X-Powered-By:PHP/7.0.6 

任何人都有一個想法獲取一些信息進行調試,或者可能有人知道Web服務器性能不佳的原因?

THX 4幫助

回答