tags:

views:

125

answers:

2

We have a flex application communicating with our server. The flex app makes many HTTP requests (posts and gets) to the server, in many cases in parallel.

We have been noticing that we get many dropped connections, experienced from the flex app.

The server does not see any failed requests at all and is not under load.

I am also suspecting that flex may be on-connection-drop, automatically retrying the POST or GET request, resulting in our server receiving the request twice.

Has anyone experienced such scenario?

How can I mitigate this problem?

+2  A: 

I've experienced this problem, stemming from not holding on to a reference to the loading object (URLLoader?), thinking that adding all the correct event listeners to it would be sufficient, once it is set up. It gets garbage collected and fails to complete. The solution was to keep all loading URLLoaders in a rooted collection, like a dictionary, and removing them on completion.

Could your problem be related?

spender
it might certainly be related... not exclusively though... i would like to hear some more options.. thanks heaps though will surely look into this.
Patrick
we are inb particular using: mx.rpc.http.HTTPService to make POSTs and mx.controls.Image.load(stringUrl) to load images and flash.media.Sound.load(new URLRequest(stringUrl) to load audio
Patrick
+1  A: 

We have had problems like this and we couldn't locate the problem neither. After searching for a long time we found out our sqlserver was overloaded (because we logged to many info's to the server). Now we log to a txt file and everything works fine.

Our flex application is a test tool which 350 candidates (at average) take at the same time. The load of the webserver and sqlserver is pretty high because every 30 seconds the state of a flex application is saved to the server (state = current exercise the candidate is working on).

We haven't had any problems, so I'm guessing your problem isn't the flex application. Maybe it's the network?

We do work with WebORB and amf remote calls. We also have a retrieveBlob.aspx handler used to fetch media. On average, when 350 candidates start there session, some 3500 media files are fetched at the same time (with caching on the server). In this case we haven't had any problems so far.

Another thing we implemented is a fallback system where if some remote call fails, flex calls it again with the same parameters. If it fails again, then an error message is shown to the candidate saying it needs to restart the application (and a resume is done).

Flex automatically retrying the post or get is something I haven't seen yet in our application.

Which server are you using? (we use Flex-Weborb-asp.net-sqlserver).

Lieven Cardoen
we are using apache in front of a tomcat with a java hibernate app to a MySql db - but we do not see any failed requests on the server side, no queuing, and very good response times. Freaky, we are working on a very similar application.
Patrick
also, are your 350 candidates on the same network as the server? or are they across the cloud?
Patrick
and what methods do you use to load audio and images? mx.controls.Image.load(stringUrl) and flash.media.Sound.load(new URLRequest(stringUrl)) ?
Patrick
Well, at one of the locations where our product is installed, the candidates are indeed on the same network as the server.Our product runs also online, but there it's not used that intense.We do use mostly amf remote calls. Maybe you should have a look at blazeDS to increase performance (but that has nothing to do with your problem of course). Maybe it's indeed a bug in flex like spender is saying.For images we use Loader, for Sound URLRequest.
Lieven Cardoen
marking this as the correct answer because it explored the most options. the core issue was never identified as the project was abandoned
Patrick