Take the 2-minute tour ×

I have a function that includes a call to CURL. This function takes about 10 seconds to complete running, and is called to run by hitting the page that contains this function.

Now if I were to have another function that calls the function (by hitting/wget the page) above once every second, will the subsequent calls run simultaneously with the previous calls that is still doing its 10 seconds of processing and curling?

share|improve this question
to theoretical for me i need to see something solid. –  Dagon Sep 24 '12 at 19:59
I think you should look at stackoverflow.com/a/10036599/1226894 –  Baba Sep 24 '12 at 20:01
@Baba curl_multi is not suitable for my situation, as I want to space out the 10 curls by 1 second each and the URL curled will be retrieved from the database, which is updated every second. –  Nyxynyxx Sep 24 '12 at 20:06

1 Answer 1

up vote 1 down vote accepted

If you are using Apache, this would be determined by the number of prefork processes you have ready. Your web server controls how many open HTTP connections are allowed.

share|improve this answer
There would be a max of 9 CURLS and PHP functions running at the same time in the example above, assuming that the subsequent calls to the PHP page is not being blocked and there is no limit to the number of HTTP connections allowed. Does this mean everytime the page is called, a new process will be created and all 9 will run in parallel? –  Nyxynyxx Sep 24 '12 at 20:04
For each HTTP request, apache will delegate a prefork process to handle it until the script has finished executing. So as I said in the answer, it depends on your http config settings. –  thatidiotguy Sep 24 '12 at 20:07

Your Answer


