Why cannot Apache handle multiple requests at the same time?

后端 未结 8 614
执笔经年
执笔经年 2021-01-31 21:23

I have AMPPS installed.

My Apache server cannot handle multiple php requests at once (for example if I call localhost/script.php multiple times, they are pr

相关标签:
8条回答
  • 2021-01-31 21:50

    manipulate yours sessions, write on start of script.php

    // manipulate writes, and unlock session file!
    session_start();
    $_SESSION['admin'] = 1;
    $_SESSION['user'] = 'Username';
    session_write_close(); // unlock session file, to another script can access
    
    // start your script without php session block
    sleep(30); 
    echo $_SESSION['user'];
    
    // another script can run without wait this script finish
    
    0 讨论(0)
  • 2021-01-31 21:52

    I encountered a similar problem. Multiple requests kept hanging randomly while connecting to the server.

    Tried changing the mpm configurations, with no use.

    Finally this one seems to solve the problem for me. (from https://serverfault.com/a/680075)

    AcceptFilter http none
    EnableSendfile Off 
    EnableMMAP off 
    
    0 讨论(0)
提交回复
热议问题