dongtan5811 2012-04-25 07:20
浏览 58
已采纳

为每个请求创建了4个进程?

We are doing some load testing on a PHP (Kohana) application. One funny thing we noticed is that each request seems to be creating 4 process each time and increases the load on the sever by 4 times. And when there are, for example, 500 users per second hitting it acts as 500*4.

I really don't understand what could be creating all these processes. My understanding is that each PHP request creates one thread, it shouldn't be creating processes, especially not 4. Could it be an Apache issue? Or PHP issue?

I didn't find any information about this on Google. Any suggestion on what could be causing this problem would be appreciated.

  • 写回答

1条回答 默认 最新

  • drrog9853 2012-04-25 07:42
    关注

    My first guess is you are simply seeing the effect of Apache MinSpareServers setting. Rather than spin up a process when a request comes it, Apache will have one ready and waiting. So if this is set to 4, Apache will always try to have active processes + 4 running.

    It could also be ThreadsPerChild setting, depending on how you have Apache configured. In this case, each child always spins up the number of threads specified so they are ready.

    Lots of processes or threads isn't necessarily an issue. They may not be doing anything except waiting to handle incoming traffic.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog