[flexcoders] Re: Simultaneous HTTPService limitation?

2011-08-02 Thread georgemeng2011
Thank you! 

Good to know there is such limit.

George

--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> I think there is an upper-bound on the number of requests you can make per 
> frame for Flash and maybe for AIR too.
> 
> 
> On 7/29/11 7:23 PM, "georgemeng2011"  wrote:
> 
> 
> 
> 
> 
> 
> I have an flex application sends HTTPService multiple times to server, 
> however, not all get return.
> 
> My server is Coldfusion, I have turn following in Coldfusion:
> 
> Maximum number of simultaneous Template requests  400
> Maximum number of simultaneous Flash Remoting requests  400
> Maximum number of simultaneous Web Service requests  400
> Maximum number of simultaneous CFC function requests  400
> Maximum number of running JRun threads  1600
> Maximum number of queued JRun Threads  1
> 
> However, when I send 500 request, I always get about 360 result/fault back, 
> any ideas?
> 
> Flex AIR application code:
> 
> 
>  xmlns:fx="http://ns.adobe.com/mxml/2009";
> xmlns:s="library://ns.adobe.com/flex/spark"
> xmlns:mx="library://ns.adobe.com/flex/mx"
> creationComplete="init()"
> width="830"
> height="433">
> 
> 
> 
> 
> 
> Coldfusion Code: Hello.cfm
> 
> Hello World
> 
> Thanks!
> 
> George
> 
> 
> 
> 
> 
> 
> --
> Alex Harui
> Flex SDK Team
> Adobe System, Inc.
> http://blogs.adobe.com/aharui
>




[flexcoders] HTTPService timeout?

2011-08-02 Thread georgemeng2011

Hello,

I have very simple code to call a simple PHP page. PHP page will insret
2000 records to mysql table, takes about 2 minutes.

On PHP side, it is fine, I tested the php page within browser, it ran
for 2 minutes and stoped. (I have configured on PHP to run longer than
normal.)

One Flex side, I call PHP page using HTTPService with requestTimeout =
300 to avoid timeout. Here is the code:

 var ws:HTTPService = new HTTPService();
 ws.requestTimeout = 300;
 ws.useProxy = false;
 ws.url = "http://localhost:85/test.php
 ";
 ws.addEventListener(FaultEvent.FAULT, fault );
 ws.addEventListener(ResultEvent.RESULT, result);
 ws.send();

However, after 30 seconds, it return fault event. I really don't
understand.

Can anyone let me know how I do this correctly?

Thank you!

George







[flexcoders] Re: HTTPService timeout?

2011-08-03 Thread georgemeng2011
Thank for taking time to answer my question!

As I mentioned in my post, I have configured and tested php within brower. It 
worked, so it is not php side issue.

My environment:

Flex Builder 4.1 with AIR 2.6, it is an AIR application. I tested within IDE as 
well as released version.

Thanks!

George


--- In flexcoders@yahoogroups.com, "mitek17"  wrote:
>
> Hi,
> 
> Yep, there is PHP setting in php.ini for that
> 
> max_execution_time = 30 ; Maximum execution time of each script, in seconds
> 
> PS php_error.log is a good thing to check
> 
> Cheers,
> 
> 
> --- In flexcoders@yahoogroups.com, "georgemeng2011"  wrote:
> >
> > 
> > Hello,
> > 
> > I have very simple code to call a simple PHP page. PHP page will insret
> > 2000 records to mysql table, takes about 2 minutes.
> > 
> > On PHP side, it is fine, I tested the php page within browser, it ran
> > for 2 minutes and stoped. (I have configured on PHP to run longer than
> > normal.)
> > 
> > One Flex side, I call PHP page using HTTPService with requestTimeout =
> > 300 to avoid timeout. Here is the code:
> > 
> >  var ws:HTTPService = new HTTPService();
> >  ws.requestTimeout = 300;
> >  ws.useProxy = false;
> >  ws.url = "http://localhost:85/test.php
> > <http://localhost:85/test.php> ";
> >  ws.addEventListener(FaultEvent.FAULT, fault );
> >  ws.addEventListener(ResultEvent.RESULT, result);
> >  ws.send();
> > 
> > However, after 30 seconds, it return fault event. I really don't
> > understand.
> > 
> > Can anyone let me know how I do this correctly?
> > 
> > Thank you!
> > 
> > George
> >
>




[flexcoders] Re: HTTPService timeout?

2011-08-03 Thread georgemeng2011
Sorry, forgot to mention that I put exactly the same code into Web application, 
it worked. 

So it must be something wrong on the AIR side. 

Again, my environment is:

Flash Builder 4.1
AIR 2.6

Thanks,

George

--- In flexcoders@yahoogroups.com, "mitek17"  wrote:
>
> Hi,
> 
> Yep, there is PHP setting in php.ini for that
> 
> max_execution_time = 30 ; Maximum execution time of each script, in seconds
> 
> PS php_error.log is a good thing to check
> 
> Cheers,
> 
> 
> --- In flexcoders@yahoogroups.com, "georgemeng2011"  wrote:
> >
> > 
> > Hello,
> > 
> > I have very simple code to call a simple PHP page. PHP page will insret
> > 2000 records to mysql table, takes about 2 minutes.
> > 
> > On PHP side, it is fine, I tested the php page within browser, it ran
> > for 2 minutes and stoped. (I have configured on PHP to run longer than
> > normal.)
> > 
> > One Flex side, I call PHP page using HTTPService with requestTimeout =
> > 300 to avoid timeout. Here is the code:
> > 
> >  var ws:HTTPService = new HTTPService();
> >  ws.requestTimeout = 300;
> >  ws.useProxy = false;
> >  ws.url = "http://localhost:85/test.php
> > <http://localhost:85/test.php> ";
> >  ws.addEventListener(FaultEvent.FAULT, fault );
> >  ws.addEventListener(ResultEvent.RESULT, result);
> >  ws.send();
> > 
> > However, after 30 seconds, it return fault event. I really don't
> > understand.
> > 
> > Can anyone let me know how I do this correctly?
> > 
> > Thank you!
> > 
> > George
> >
>




[flexcoders] HTTP requestTimeout limit in AIR 2.6?

2011-08-03 Thread georgemeng2011
I posted another post with the same question, but that post was not clear. So 
here is the update.

In short, I have the same code works in Web, Framework 3.5 AIR, but not 
Framework 4.1 AIR.


Environment first: Flash Builder 4.1, AIR 2.6

I have a PHP page which insert records to DB, takes 2 minutes to run, I have 
already configured and tested on PHP side, it worked.

When I call it using AIR application (using AIR 2.6, Framework 4.1), it return 
faults after 30 seconds, within IDE as well as after release.

However, I take the same code to web, still using Framework 4.1, it worked as 
expected; I also run the code with AIR application (Air 2.0, Framework 3.5), it 
worked as well.

So the only thing not work is Framework 4.1, AIR 2.6. That is where I don't 
understand.

Once again, no problem on server side, already tested within browser as well as 
Flex Web application, Flex 3.5 Air application.

So any ideas? The code is here, as you can see, I even set requestTimeout to 
300 seconds:

var ws:HTTPService = new HTTPService();
ws.requestTimeout = 300;
ws.useProxy = false;
ws.url = "http://localhost:85/test.php";;
ws.addEventListener(FaultEvent.FAULT, fault );
ws.addEventListener(ResultEvent.RESULT, result);
ws.send();

Thanks very much!

George



[flexcoders] 60 seconds cut-off for batch HTTPService?

2011-08-03 Thread georgemeng2011
First my environment: Flash Builder 4.1, AIR 2.6

Within AIR application, I have code like this:

private function init():void
{

for ( var i:int = 0; i < 500; i++ )
{
var ws:HTTPService = new HTTPService();
ws.requestTimeout = 300;
ws.useProxy = false;
ws.url = "http://localhost:85/test.php";;
ws.addEventListener(FaultEvent.FAULT, fault );
ws.addEventListener(ResultEvent.RESULT, result);
ws.send();
}
}

I send multiple HTTP request to server to process, each HTTP request suppose to 
run 2 seconds then return (result or fault).

I expect the code to run up to 5 minutes. However, It run only one minutes.

I tried:
1) Increase requestTimeout, still one minute
2) Switch to different PHP server with different configuration, still one minute
3) Switch to Coldfusion, still one minute
4) Run the same code using Framework 3.5. Still one minute

Looks like when I send multiple HTTPService request, AIR/Framework override 
requestTimeout with 60 seconds. Is that true?

Just wonder where 60 seconds cut-off time come from.

Thanks very much!

George







[flexcoders] Blur all text in Application

2011-08-04 Thread georgemeng2011
Hello,

We build an AIR application to show business information using Flash Builder 
4.1 and AIR 2.6.

Sometimes user wants to take screenshot of Application, but because it contains 
some sensitive information, user want us add a button to blur all text objects: 
including legend, Axis label, text label, etc, but still kepp other components 
like Chart clear.

Any idea or solution for this?

Thanks,

George



[flexcoders] Single HTTPService vs Multiple HTTPService

2011-08-11 Thread georgemeng2011
Hi Guys,

Asked this question before, did not get the answer.

My environment Flash Builder 4.1 with AIR 2.6.

I have a HTTPService call which will last 2 minutes.

In my AIR application, when I run one HTTPService, no matter how I set 
requestTimeout, it will only run up to 30 seconds. When I use the same code in 
Web application, it worked. I think there is some problems in AIR runtime 
caused the issue.

When I kick out 100 HTTPService using a loop, all these HTTPService will run up 
to 60 seconds: the last result or fault event handler will come back in 60 
seconds.

If single HTTPService has 30 seconds limit, why multiple HTTPService calls have 
60 seconds?

Thanks,

George