开发者

What prevents a browser from loading 2 long running PHP scripts concurrently from the same domain?

开发者 https://www.devze.com 2023-02-12 17:47 出处:网络
There appears to be a limit on the number of concurrent scripts for a php session. I say session and not IP / client because I can start up another browser and load the secon开发者_Go百科d script. Is

There appears to be a limit on the number of concurrent scripts for a php session. I say session and not IP / client because I can start up another browser and load the secon开发者_Go百科d script. Is there a parameter limiting to one concurrent script?

You have to wait for one to complete before the other one starts loading.


The default session handler uses files, and will lock the session file for the duration of the request. If you have a long-running script, then you should force it to relinquish the session lock by doing a session_write_close() before entering the "long running" part of the script.

You can always re-open the session with session_start() again later on, if you need to modify session data after the long-running portion completes.

0

精彩评论

暂无评论...
验证码 换一张
取 消