Why is PHP producing high load on apache when it reads a file over the network?
When I read from a file (independently while using fopen or file_get_contents) on a URL and the file is n开发者_StackOverflowot answering fast, PHP produces a relatively high load on its apache process when waiting for the URL to respond.
If I have some more visitors on my website and they all run the same script, the apache (and even the server) is going to die because there are these apache processes with the high load which will not end in a normal time.
Are there any solutions how to handle this problem or how to reduce the load of these apache processes still waiting for the URL to respond?
精彩评论