I'm getting an error after 30 seconds of execution of this service
<s:HTTPService id="svcList" url="http://localhost/index.php" method="GET" result="svcList_resultHandler(event)" fault="svcList_faultHandler(event)" requestTimeout="300">
<s:request xmlns="">
<mod>module</mod>
<op>operation</op>
</s:request>
</s:HTTPService>
This operation takes longer than usual so I changed the max execution time for php to 120 seconds.
The script runs correctly when is requested through a browser i.e http://localhost/index.php?mod=module&op=operation
I've already checked the fault event object for an answer and find this at faultDetails Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://localhost/index.php" errorID=2032]. URL: http://localhost/index.php
Is there a execution time limit for requests ?
Edit: Using requetTimeout
already.
Thanks
Ok, in my working environment
(Flex SDK 4.1 - AIR 2.6)
simply usingrequestTimeout="xx"
doesn't work I don't know why.But setting a very global object
URLRequestDefaults
propertyidleTimeout
works as I need.The solution for my proble is this configuration, at the top of the application.
I believe this could help somebody.
Though it seems to be assumed that requestTimeout doesn't work. It actually does... the 1st time.
After the 1st request, the requestTimeout is set in
If you have to change the timeout, you will want to do it there.
To see the specific offending code, see AbstractOperation.getDirectChannelSet(). Even for different instances of HTTPService, it pulls from:
_directChannelSet is only instantiated once, and the requestTimeout on it is only set on creation, so even if you change the requestTimeout on HTTPService, it won't reflect in the request.
You can set the request time out of http service objects, this will do what it says on the tin, but if you want to know more here is a link for the language reference:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/rpc/http/HTTPService.html#requestTimeout
Here is an example of how it could look in your code snippet with a 120 second time out:
Also worth bearing in mind if you set this attribute to zero or less, the request will not time out at all (according to the language ref).