Flex Builder 3 - RemoteObject connection failure

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Flex Builder 3 - RemoteObject connection failure

supertodda
Hello,

I'm having the following issue with Flex Builder 3...

When I try to connect using a RemoteObject it will work 85% of the
time, but sometimes it will hang and die without returning a fault.
Here's what I figured out so far:

1) the problem did not happen with the same code when compiled against
Flex 2 SDK.

2) it seems to happen more often in Firefox vs. Internet Explorer

3) it seems to happen more often on slower connections

4) I'm using the most current flash player and Flex 3 SDK

5) I'm suing the most current beta version of AMFPHP to connect to on
the back end.

6) There does not seems to be any setting I can set in the
services-config.xml (and related) files that will affect the problem
(tried various timeouts, etc).

7) when I run the logger, the last message I get before it dies is
something like "...mx.messaging.Channel 'null' pinging endpoint".  I
get this message when it goes though correctly, however it quickly
continues on.

8) As far as I can tell, it does not ever make it back to the server
(I could be wrong on this, but I see no messages in the AMFPHP debug
directories)

9) When it freezes, I cannot re-send the message or initiate another
connection.

10) We are using the latest version of Cairngorm to send the messages
via the delegates.

So, I'm not sure where exactly the problem is.  I don't think it's my
server setup, since it works fine compiled against flex 2 sdk.  Could
be something with the flash player, or firefox, or Cairngorm in flex 3??

Has anybody experienced this issue, and if so, can you either shed
more light on the problem, or let me know how to solve it.

Any thoughts?

Thanks,
-Todd

Reply | Threaded
Open this post in threaded view
|

Re: Flex Builder 3 - RemoteObject connection failure

supertodda
Anybody out there experiencing this issue in flex 3 with AMFPHP?

Reply | Threaded
Open this post in threaded view
|

Re: Flex Builder 3 - RemoteObject connection failure

valdhor-2
Actually no.

I do a lot of AMFPHP RemoteObject calls in my application and have
never had this problem.

There are two things you mention in your post that are different here...

1.  My application is only used on an intranet so all connections are
fast.

2.  I am not using Cairngorm at the moment.

Whether one of these is the root cause I cannot say.

One thing you may like to do is set a timeout value. When the call
times out, in your fault handler try to disconnect the connection and
then retry (Or alert the user).

<mx:RemoteObject id="blah" source="foo" destination="amfphp"
fault="faultHandler(event)" showBusyCursor="false" requestTimeout="10">

private function faultHandler(fault:FaultEvent):void
{
    switch(fault.fault.faultCode.toString())
    {
        case "Client.Error.RequestTimeout":
            blah.disconnect();
            Alert.show("The server is not responding. Please check
that you are connected and the server is running.", "Server Timeout");
        break;
        default:
            Alert.show(fault.fault.faultString,
fault.fault.faultCode.toString());
        break;
     }
}




--- In [hidden email], "supertodda" <todd@...> wrote:
>
> Anybody out there experiencing this issue in flex 3 with AMFPHP?
>


Reply | Threaded
Open this post in threaded view
|

Re: Flex Builder 3 - RemoteObject connection failure

supertodda
I tried the timeout, but it did not have any effect.

So, I'm trying to figure out if it's a problem with one of the following:

1) flash player
2) AMFPHP working with Flex 3
3) Cairngorm on Flex 3
4) Flex 3 SDK
5) Some browser related issue

Like I say, it works with Flex 2 sdk, so I'm at a loss...  I think
it's even stranger that nobody else has ever had this problem.

Any other ideas?  Is there any way to force a
disconnection/reconnection after a freeze?

Thanks,
-Todd


--- In [hidden email], "valdhor" <stevedepp@...> wrote:

>
> Actually no.
>
> I do a lot of AMFPHP RemoteObject calls in my application and have
> never had this problem.
>
> There are two things you mention in your post that are different here...
>
> 1.  My application is only used on an intranet so all connections are
> fast.
>
> 2.  I am not using Cairngorm at the moment.
>
> Whether one of these is the root cause I cannot say.
>
> One thing you may like to do is set a timeout value. When the call
> times out, in your fault handler try to disconnect the connection and
> then retry (Or alert the user).
>
> <mx:RemoteObject id="blah" source="foo" destination="amfphp"
> fault="faultHandler(event)" showBusyCursor="false" requestTimeout="10">
>
> private function faultHandler(fault:FaultEvent):void
> {
>     switch(fault.fault.faultCode.toString())
>     {
>         case "Client.Error.RequestTimeout":
>             blah.disconnect();
>             Alert.show("The server is not responding. Please check
> that you are connected and the server is running.", "Server Timeout");
>         break;
>         default:
>             Alert.show(fault.fault.faultString,
> fault.fault.faultCode.toString());
>         break;
>      }
> }
>
>
>
>
> --- In [hidden email], "supertodda" <todd@> wrote:
> >
> > Anybody out there experiencing this issue in flex 3 with AMFPHP?
> >
>


Reply | Threaded
Open this post in threaded view
|

Re: Flex Builder 3 - RemoteObject connection failure

valdhor-2
Based on my use situations I can rule out 1, 2 and 4.

To debug 1, you may like to try an older version of the Flash Player
from Adobe's site. BTW Is there is any difference using a release or
debug version of the Flash player?

To debug 2, you may like to try WebORB. It is fairly simple to change
between AMFPHP and WebORB.

Have you checked the bugbase for outstanding issues?

Other than that, I am at a loss. Maybe someone else can chime in?



--- In [hidden email], "supertodda" <todd@...> wrote:
>
> I tried the timeout, but it did not have any effect.
>
> So, I'm trying to figure out if it's a problem with one of the
following:

>
> 1) flash player
> 2) AMFPHP working with Flex 3
> 3) Cairngorm on Flex 3
> 4) Flex 3 SDK
> 5) Some browser related issue
>
> Like I say, it works with Flex 2 sdk, so I'm at a loss...  I think
> it's even stranger that nobody else has ever had this problem.
>
> Any other ideas?  Is there any way to force a
> disconnection/reconnection after a freeze?
>
> Thanks,
> -Todd
>
>
> --- In [hidden email], "valdhor" <stevedepp@> wrote:
> >
> > Actually no.
> >
> > I do a lot of AMFPHP RemoteObject calls in my application and have
> > never had this problem.
> >
> > There are two things you mention in your post that are different
here...

> >
> > 1.  My application is only used on an intranet so all connections are
> > fast.
> >
> > 2.  I am not using Cairngorm at the moment.
> >
> > Whether one of these is the root cause I cannot say.
> >
> > One thing you may like to do is set a timeout value. When the call
> > times out, in your fault handler try to disconnect the connection and
> > then retry (Or alert the user).
> >
> > <mx:RemoteObject id="blah" source="foo" destination="amfphp"
> > fault="faultHandler(event)" showBusyCursor="false"
requestTimeout="10">

> >
> > private function faultHandler(fault:FaultEvent):void
> > {
> >     switch(fault.fault.faultCode.toString())
> >     {
> >         case "Client.Error.RequestTimeout":
> >             blah.disconnect();
> >             Alert.show("The server is not responding. Please check
> > that you are connected and the server is running.", "Server Timeout");
> >         break;
> >         default:
> >             Alert.show(fault.fault.faultString,
> > fault.fault.faultCode.toString());
> >         break;
> >      }
> > }
> >
> >
> >
> >
> > --- In [hidden email], "supertodda" <todd@> wrote:
> > >
> > > Anybody out there experiencing this issue in flex 3 with AMFPHP?
> > >
> >
>


Reply | Threaded
Open this post in threaded view
|

RE: Re: Flex Builder 3 - RemoteObject connection failure

Kevin Aebig
In reply to this post by supertodda
Which version of AMFPHP?

 

!k

 

  _____  

From: [hidden email] [mailto:[hidden email]] On
Behalf Of supertodda
Sent: Thursday, April 17, 2008 6:59 PM
To: [hidden email]
Subject: [flexcoders] Re: Flex Builder 3 - RemoteObject connection failure

 

Anybody out there experiencing this issue in flex 3 with AMFPHP?

 

Reply | Threaded
Open this post in threaded view
|

Re: Flex Builder 3 - RemoteObject connection failure

supertodda
In reply to this post by supertodda
I've Fixed the problem!

Thanks to those who have contributed solutions.  To answer your
question, I was using the latest 1.9 beta version of AMFPHP with the
PHP  class for performance.  This was not the problem...

The fix was to move all the code onto a Apache 2.2 server.  Originally
was was running the code on an apache 1.x instance for backwards
compatibility, legacy, PHP thread issue reasons.  When I served the
same code over Apache 2.2 the problem was resolved (and the
performance was a little better - Bonus!)  I think that the new apache
handles SSL a bit better/faster.  Also, just to note, I'm running on
Windows 2003, which has been a great platform for us.

I've tested it throughly, I've even dumbed my net connection down to
53Kbs using NetLimiter and everything runs fine, so the slow
connection is not a factor.

Please let me know if you need me to elaborate the fix anymore, but if
anybody out there is having connection issues, then this may be the
solution.

Thanks again.

-Todd


--- In [hidden email], "supertodda" <todd@...> wrote:
>
> Anybody out there experiencing this issue in flex 3 with AMFPHP?
>


Reply | Threaded
Open this post in threaded view
|

Re: Flex Builder 3 - RemoteObject connection failure

valdhor-2
Glad to hear your problem has been solved.

I never thought about the Apache version. We have been running 2.2 for
some time now.


--- In [hidden email], "supertodda" <todd@...> wrote:

>
> I've Fixed the problem!
>
> Thanks to those who have contributed solutions.  To answer your
> question, I was using the latest 1.9 beta version of AMFPHP with the
> PHP  class for performance.  This was not the problem...
>
> The fix was to move all the code onto a Apache 2.2 server.  Originally
> was was running the code on an apache 1.x instance for backwards
> compatibility, legacy, PHP thread issue reasons.  When I served the
> same code over Apache 2.2 the problem was resolved (and the
> performance was a little better - Bonus!)  I think that the new apache
> handles SSL a bit better/faster.  Also, just to note, I'm running on
> Windows 2003, which has been a great platform for us.
>
> I've tested it throughly, I've even dumbed my net connection down to
> 53Kbs using NetLimiter and everything runs fine, so the slow
> connection is not a factor.
>
> Please let me know if you need me to elaborate the fix anymore, but if
> anybody out there is having connection issues, then this may be the
> solution.
>
> Thanks again.
>
> -Todd
>
>
> --- In [hidden email], "supertodda" <todd@> wrote:
> >
> > Anybody out there experiencing this issue in flex 3 with AMFPHP?
> >
>


Reply | Threaded
Open this post in threaded view
|

Re: Flex Builder 3 - RemoteObject connection failure

Jason Adams
In reply to this post by supertodda
We are experiencing similar problems with a BlazeDS/Tomcat/Flex 3 app. We have tracked through logging call from the flex app to the BlazeDS RemoteObject to through JDBC to the database and back to the RemoteObject then when the RemoteObject returns a data object it hangs after passing the data back to BlazeDS. No fault and no result events are issued. It just stops there.

Another note is this does not happen after a restart but begins to slow down over a few invokations then quits altogether. I have read some other threads on this with no resolution other than some ritualistic changes making little sense. It seems to me a limitation in the channeling because this seemed to occur after adding more remote calls and we have other apps calling the same remote object not experiencing this. The app we are having this problem has recently had added remote object calls that were daisy chained for synchronism and that was removed.

My question to you is are you firing off many remote calls at once. I am going to spend an hour re-daisy chaining the calls to test this theory out you might explore this as well. Unfortunately there seems no documentation on the limitations with BlazeDS or I haven't found that yet. We have 8 processors and 100 gigs of memory available so threading in the back end should not be a limitation.

Anyone else have similar problems???
Reply | Threaded
Open this post in threaded view
|

Re: Flex Builder 3 - RemoteObject connection failure

banupriya
This post has NOT been accepted by the mailing list yet.
Hi ,

 I am facing one issue, from the remote object  i am calling RPC.When the RPC is takine long time to return the results, then at that time  my application gets hanged. I have set the request time out 15 milli seconds when its takes more time its getting closed. then also the application get hanged.Is there is any solution t avoid this problem

regards
Banu