2

我正在使用 Ez-platform 1.8 和 Symfony 2.8 开发后台办公室。

我将此后台用于移动应用程序。我的 api 反应很好。

我只是对同时请求有一个很大的问题。

让我解释一下: - 在移动应用程序的第一页上,我需要同时检索 2 个提要。- 当我同时进行这些调用时,我的服务器对我的 http 请求响应 200OK,但使用这个答案而不是我的 JSON:

<br />
<b>Fatal error</b>:  Uncaught exception 'Symfony\Component\Routing\Exception\ResourceNotFoundException' with message 'None of the routers in the chain matched this request
GET /_fos_user_context_hash HTTP/1.0
Accept:               application/vnd.fos.user-context-hash
Accept-Charset:       ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Encoding:      gzip
Accept-Language:      en-us,en;q=0.5
Authorization:        
Connection:           close
Host:                 test.dev.test.com
Surrogate-Capability: symfony2=&quot;ESI/1.0&quot;
User-Agent:           okhttp/3.5.0
X-Forwarded-For:      172.16.100.147
X-Php-Ob-Level:       1
' in /home/www-data/test/releases/1.0.0-d3787bc1/vendor/symfony-cmf/routing/ChainRouter.php:207
Stack trace:
#0 /home/www-data/test/releases/1.0.0-d3787bc1/vendor/symfony-cmf/routing/ChainRouter.php(156): Symfony\Cmf\Component\Routing\ChainRouter-&gt;doMatch('/_fos_user_cont...', Object(Symfony\Component\HttpFoundation\Request))
#1 /home/www-data/test/releases/1.0.0-d3787bc1/vendor/symfony/symfony/src/Symfony/Co in <b>/home/www-data/test/releases/1.0.0-d3787bc1/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php</b> on line <b>95</b><br />

但是当我延迟这两个调用时,服务器会响应我的 json。

你知道为什么以及如何解决这个问题吗?

谢谢。

编辑 :

我正在调用的网址:第一个提要: https ://test.dev.test.com/apimobile/slides

[  
   {  
      "id":65,
      "title":"Slide 1",
      "subtitle":"subtitle 1",
      "image":"https:\/\/test.dev.test.com\/var\/site\/storage\/images\/5\/1\/2\/0\/215-1-eng-GB\/home02.jpg"
   },
   {  
      "id":66,
      "title":"Slide 2",
      "subtitle":"subtitle 2",
      "image":"https:\/\/test.dev.test.com\/var\/site\/storage\/images\/5\/1\/2\/0\/215-1-eng-GB\/home01.jpg"
   }
]

第二个提要: https ://test.dev.test.com/apimobile/news

[
    {
        "id": 63,
        "date": "16/03/2017",
        "category": "Catégorie 1",
        "title": "Actu 2",
        "shortContent": "short description actu 2"
    },
    {
        "id": 64,
        "date": "16/03/2017",
        "category": "Catégorie 2",
        "title": "Actu 3",
        "shortContent": "short description actu 3"
    },
    {
        "id": 62,
        "date": "16/03/2017",
        "category": "Catégorie 1",
        "title": "Actu 1",
        "shortContent": "short description actu 1"
    }
]
4

0 回答 0