Re: Question about apache-php concurrent process control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Liang ZHONG wrote:
> As I know, apache-php works this way. When the web server gets an http
> request with file name extension ".php", it will start the php
> interpreter to process the php file.
> 
> Now I have a php program does something like this: when it is executing
> with one parameter p1, the program code goes to contact a database, gets
> back huge amount of data, writes it to file system. This will take
> pretty long time to finish. In the mean time, the same php code will be
> invoked by apache with another request, passing different parameter p2,
> indicates the code need to run to check the availability and read
> partial of the data which has already writen to the file system just
> now. The program location need to be in the same URL, but with only
> different parameter passing to it.
> 
> for example:
> 
> http://baseURL/a.php?v=p1
> http://baseURL/a.php?v=p2
> 
> I want these 2 process can be run concurrently, but through a small
> test, I found out that they just sequentially execute one after the other.

Sorry, your test is wrong then.  Apache/PHP does not serialize requests
like that.  If somehow the backend you are collecting data from is
serializing the requests, then you are out of luck and frontend threads
isn't going to solve that since your threads would simply be serialized
as well.  You are on the wrong track here.

-Rasmus

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux