Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Calling URLLoader from AIR in Rapid Succession Causes Error 2032

Explorer ,
Jun 26, 2013 Jun 26, 2013

Hi All,

Within AIR, I am issuing multiple POST calls with URLLoader in rapid succession to the same web service on the same server.

About half of them fail with error #2032. In the HTTPStatus handler, I get status=0.

I suspected keep-alive issues, so I added "Content: close" to the URLRequest header and made sure I called URLLoader.close() as soon as I got a succesful response from calls which succeeded- but no joy.

I would appreciate any ideas.

mlavie

TOPICS
ActionScript
1.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 26, 2013 Jun 26, 2013

are you calling different scripts?

if so, there should not be a problem.  if you're calling the same script more than once, you need to wait for the complete event before reissuing another call the script.

Translate
Community Expert ,
Jun 26, 2013 Jun 26, 2013

are you calling different scripts?

if so, there should not be a problem.  if you're calling the same script more than once, you need to wait for the complete event before reissuing another call the script.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jun 27, 2013 Jun 27, 2013

What do you see if you watch the traffic in Charles? Note that I would not expect that you'd need to wait for a call to a server to return before making another one, unless making the calls too close together results in an error on the server. For example, making a call that would result in an update if a record already exists while a call is still in process to that same method (where it's still in the process of doing an insert) can cause an error.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 03, 2013 Jul 03, 2013

Kglad and Amy - thanks for your responses.

I inspected the traffic in Fiddler and Wireshark. It appears that AIR is not even trying to reach the server for those failed instances. After extensive Googling, it seems that mutiple URLLoader calls is a sure recipe for problems. I made the calls serial by having each Success handler call the next URLLoader.

Again - thanks for repsonding,

mlavie

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 03, 2013 Jul 03, 2013
LATEST

you're welcome and, that is correct.  again, if you're calling the same script more than once, you need to wait for the complete event before reissuing another script call.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines