Running concurrent PHP scripts

后端 未结 6 2085
孤独总比滥情好
孤独总比滥情好 2020-12-10 15:45

I\'m having the following problem with my VPS server.

I have a long-running PHP script that sends big files to the browser. It does something like this:



        
6条回答
  •  無奈伤痛
    2020-12-10 16:15

    Check your httpd.conf file. Maybe you have "KeepAlive On" and that is why your second request hangs until the first is completed. In general your PHP script should not allow the visitors to wait for long time. If you need to download something big, do it in a separate internal request that user have no direct control of. Until its done, return some "executing" status to the end user and when its done, process the actual results.

提交回复
热议问题