0
votes

We have an AIR client sending HTTPService Post request to Tomcat. The operation takes more than 30 seconds in the server since its a files transfer operation.

By the time the server returns the response, Flex is throwing a fault, 2032, stream error ( checked a lot on the net ) Looks like its timing out after 30 seconds, waiting for the Http response.

i tried setting ht.requestTimeout, it did not work. Setting URLRequestDefaults.idleTimeout also is not working. Looks like i have hit a dead end on this.

Solutions please...

2
Is the flex request timing out; or is the server request timing out?JeffryHouser
Its on the Air side. We have set a large timeout on Tomcat. The client shows a stream error, 2032 after 30 seconds. tried upgrading to latest AIR. Didn't help. This is critical and we need to fix it. Please let me know if there is a way out...Blue Sky
I'm not sure; I know I've had longer requests (~1 minute) using AMF without timeouts. Hopefully someone else more knowledgeable can chime in.JeffryHouser
@Vish I encountered same problem. Were you able to resolve the issue? My air client fails because of the request time out.user3123690

2 Answers

1
votes

You need to increase HTTPService timeout using property requestTimeout

Provides access to the request timeout in seconds for sent messages. A value less than or equal to zero prevents request timeout.

you could also use its fault event to catch timeout, and proceed accordingly.

Hope that Helps

0
votes

I've been fighting this issue as well. Add this code snippet before you send() your request:

URLRequestDefaults.idleTimeout = 120000;  // in millis so this setting would timeout after 120 seconds.

It seems as though there's a bug in the Flash Player for AIR (Flex uses a different one) that ignores responseTimeout on the HTTPRequest object. This sets the timeout properly.