Randomly Client.Error.DeliveryInDoubt error when calling to a Java server from Flex application using AMF protocol
This post has NOT been accepted by the mailing list yet.
I have a project published in the Internet that is used by thousands of users every day. Basically, I'm using a server in AmazonAWS with the server part compiled in Java 6 running in a Tomcat. I'm using AMF to publish the services and my client is built in Flex 4.6 using Flash Builder to generate the classes to connect to the AMF services. The code I'm using to connect to the services is this:
public var cpcService:RemotingServicesImpl;
private function callService():void
var responder:Responder=new Responder(gameStateLoaded, gameStateFailed);
var token:AsyncToken=cpcService.getGameState(encryptedSession, taskKey);
private function gameStateFailed(ev:FaultEvent=null):void
DisplayUtil.trackErrorInfoEvent("FATAL - FatalError", "getGameState-" + FlexGlobals.topLevelApplication.mainView.currentState, ev, encryptedSession);
private function gameStateLoaded(ev:Object):void
// my fantastic code when everything is ok
Normally, everything is ok and my application is working, but some calls (like 1 every 500) are not working, I know it because in the trackErrorInfoEvent function I'm registering an event in the Google Analytics, so I know this is randomly happening. This is the error:
faultCode = "Client.Error.DeliveryInDoubt"
faultDetail = "Channel disconnected before an acknowledgement was received"
faultString = "Channel disconnected"
rootCause = (null)
I've seen here that this error can appear when uploading or getting files in the services, but this is not my case.
I've seen here that this error can appear using some Spring configuration to prevent users from logging in more than once, but I'm not using Spring on this project.
It is happening even in a simple service that is accepting a string and returning a boolean, so I think is not due to returning huge amount of data like is described here.
In some forums, I have seen that there are people playing games (like LOL) that are getting this error, seems that they are using a proxy to connect to the Internet or a really slow connection. I can understand this, but it's hard to think that this user is having problems to call to a service but he can record this problem on the Google Analytics server, isn't it?
So, I'm stucked, any help will be really apreciated. Thanks in advance!