FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Response time add up for asynchronous requests





sheetal_nikam
I am using WAMP server and ExtJs for displaying UI.

Asynchronous requests are fired from UI to PHP code.

response time of 1st request is added in response time of 2nd request and so on which makes the last request to end after a pretty long time.
Code:

E.g.   Request No     Processing Time    response time shown in firebug
         1                    5 seconds                5 seconds
         2                    10 seconds              15 seconds
         3                    5 seconds                20 seconds


The timeout set by ExtJs for receiving response is 30 seconds. Hence all the requests which take more that 30 seconds to respond are not processed.

For Asynchronous requests apache or the PHP code should respond as soon as the request is processed.

I want to know whether I need to configure apache to support multiple requests at a time and respond as soon as the request is processed or do I need to write some special piece of code in PHP to respond immediately once the request is processed.
jmraker
You can try adding flush() in the right spots, if there's any output in less than 30 seconds
or ob_flush() if you're using ob_start()

Flushing should send the http headers, that might be enough to count as a response

http://us3.php.net/manual/en/function.flush.php
http://us3.php.net/manual/en/function.ob-flush.php
Related topics
Bluetooth
"What's in" in Web Design
PHP VS ASP
AJAX tutorial [2nd part now updated]
Windows XP SP3 comming soon
who know how to make wireless connection become faster?
The most powerful Yahoo! Bot
Article Shop
Apache
Add Your Response
URGENT action needed, I can't add my domain to my CPanel
what is AJAX
No internet required to access Facebook in India
Add a chat sidebar to a phpbb3 template for 600 coins?
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.