douyun7718 2014-05-15 15:45
浏览 37

Apache 2服务器延迟5秒

I have a problem, that I can not solve. Some of the communication (~10-20%) between the frontend and the backend server has stuck. Can anyone give me an advice?

Frontend PHP --------- curl --------> Backend PHP

  • The frontend sends the request and it is arriving immediately to the Apache
  • In the backend log there is a 5 sec delay for the start of the operation
  • The backend log says that the operation was fast

Example:

  • frontend curl log:

    16:30:00.00 - Runtime: 5.2454 
    
  • backend apache access log:

    16:30:00.01 - /backend/.... 
    
  • backend log:

    16:30:05.01 - Runtime: 0.2254
    

The way that I am logging:

  • Frontend log:

    <?php
    ....
    startTime
    send curl request to Backend IP
    write to the log: currentTime, currentTime-startTime
    ...
    ?>
    
  • Backend log:

    <?php
    startTime
    PHP/MySQL/Redis/etc
    write to the log: currentTime, currentTime-startTime
    ?>
    

Server

  • Debian 6.0.3
  • Apache/2.2.16
  • PHP 5.3.3
  • MySQL Ver 14.14 Distrib 5.1.49
  • Redis server 2.4.2
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 目详情-五一模拟赛详情页
    • ¥15 有了解d3和topogram.js库的吗?有偿请教
    • ¥100 任意维数的K均值聚类
    • ¥15 stamps做sbas-insar,时序沉降图怎么画
    • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
    • ¥15 关于#Java#的问题,如何解决?
    • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
    • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
    • ¥15 cmd cl 0x000007b
    • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line