We have a flex/php web application which we are trying to modify to work with a pair of
web servers using IP takeover to switch between the two servers. The servers are running
Linux and we use pacemaker to perform the IP takeover.
If the browser (web application) is sitting idle when the IP takeover occurs, everything works
fine, but if the user is performing actions which require in back and forth communication with
the web server, it hangs.
Any ideas on how to resolve this?
[This is not an answer, I'm working on this problem with the OP]
Just to clarify, here's what happens:
1) Flex successfully connects to the server via a NetConnection (AMFChannel) and submits an RPC request
2) Then the server end of the corresponding TCP session disappears due to IP takeover
3) Flex keeps waiting for the response from step (1) that never arrives. It seems that after this point *all* NetConnection-based connections get stalled forever.
I was able to reproduce it with a simple test similar to the following:
var channel:AMFChannel = new AMFChannel ("xyz", "http://server/endpoint/url");
var channelSet:ChannelSet = new ChannelSet();
var ro:RemoteObject = new RemoteObject();
ro.source = "SomeService";
ro.destination = "SomeService";
ro.channelSet = channelSet;
ro.infiniteDelay(); // server method that never returns
"infiniteDelay" is a server-side method that essentially sleeps forever and never sends an answer back to the client.
After this all subsequent connections via (new instances of) NetConnection to the same host get stalled on the Flex side.
Even calling channelSet.disconnect() and channel.netConnection.close() on the original stalled connection doesn't resolve this.
Ideally we would like to detect such stalled connections, reconnect them and "replay" any outstanding unacknowledged RPC calls.
But even before we try to implement this, we need a way to forcefully disconnect a NetConnection that is in a "read" state. Is there no way to do this in Flex? This seems like a major omission.
Any help would be greatly appreciated.