Hi y'all,
I have a Flex 3 Web application that makes RO calls to ColdFusion 8,
which queries an MS SQL 2k Server and returns the result to the Flex
application. This works great.
Now I have converted this Web app. into an AIR app, and adding a
"sync" ability so that if users are not online, they can still work.
When connectivity is detected, the application will sync the local
database with the remote database.
I am currently working on retrieving all the remote DB's info and
creating a local copy of the DB (with SQLite). Since the remote DB's
structure can change (table names, table schema, etc.), I am creating
the local DB dynamically.
Now, the remote db has over 100 tables and thousands of records. So a
lot of queries are being made and I think I am running out of Java
Heap Space in Coldfusion. I only suspect this because the application
would hang after running X amount of queries - and it is not
consistent. There is no pattern as to which query it will stall. And
then I get a FaultEvent in AIR:
[RPC Fault faultString="error" faultCode="Channel.Call.Failed"
faultDetail="NetConnection.Call.Failed: HTTP: Failed"]
messageId="2EA64A76-B6BE-23ED-B2F4-C0D3B84BD3DF" type="fault"
bubbles=false cancelable=true eventPhase=2]
Then in CF8, I get a message like this:
[Flex] Error handling message: flex.messaging.MessageException: No
destination with id '' is registered with any service.
incomingMessage: Flex Message (flex.messaging.messages.CommandMessage)
operation = invalid.12
clientId = ....... (and so on ...)
I have already increased the heap space allowance to 1024MB through
CF8's Admin. I think that's the max it will go because when I tried
to increase it more, CF8 would not start.
The only other solution I can think of is to limit the amount of RO
calls to CF8 at a time (like in batches). Does any one know if this
is possible? (I also don't know if I am allowed to change the
production CF8's configuration anyways... so it would be best if I can
avoid having to change CF8 itself).
If there is a better way of solving the above dilemma, you have my
ears. :) And if I am totally off on my diagnosis and you have a
theory as to what else could be wrong, please let me know!