Parallel processing of requests from the same client

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Piliskner
Forum Newbie
Posts: 4
Joined: Fri Nov 26, 2010 8:14 am

Parallel processing of requests from the same client

Post by Piliskner »

Hello there,

I am trying to get my server process many requests from the same host simultaneously. I have found out that this is blocked because each request wait for the previous to free r/w privilages to session file. So I have implemented MySQL session storing acording to http://www.freeopenbook.com/mysqlcookbo ... ect-3.html.

It works fine the session is saved in my db but the requests still wait for the previous to end.

Can someone please help me with this ? I need this for testing purposes of estimating script runtime when server process multiple parallel requests.
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: Parallel processing of requests from the same client

Post by McInfo »

Try closing the session as soon as possible in the first request. See session_write_close(). If the request sequence is irrelevant, also start the session as late as possible.
Piliskner
Forum Newbie
Posts: 4
Joined: Fri Nov 26, 2010 8:14 am

Re: Parallel processing of requests from the same client

Post by Piliskner »

Thank you very much kind sir
Piliskner
Forum Newbie
Posts: 4
Joined: Fri Nov 26, 2010 8:14 am

Re: Parallel processing of requests from the same client

Post by Piliskner »

That solution works even when I am not using DB based session but somehow it does not work on my 2nd pc. What server/php configuration might affect this ?

EDIT: in fact it did not help the results I had running requests simultaneously were produced in IE, FF runs them still in queue ... srsly wtf ?
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: Parallel processing of requests from the same client

Post by McInfo »

The most I can suggest is to compare the outputs of phpinfo() from the two servers.
Post Reply