Rhoconnect sends 0 records synchronizing huge amount of data

Hi all,

I have a problem in synchronizing my rhomobile app with my rhoconnect installation on Linux Ubuntu:

synchronizing a model with more than 1000 record sometimes falls into a timeout error, and RhoConnect Console shows the following text into error document

{

    "query-error":{

        "message":"Timeout::Error"

    }

}

and the device app log shows "Got 0(Processed: 0) records of 0 from server".

In other cases I obtain the same empty result but console error document doesn't say anything, the client document has the correct list of records, but cd_size document shows "0".

I try to set thin options (/etc/thin/myapp.yml) "timeout" and "wait" with larger values, I try to increase rhoconfig.txt "net_timeout" option, but huge models still sync 0 records.

My tests shows that this behaviour appears only when synchronizing a huge amount of data, but I can't get out of this problem because in Ubuntu terminal I can't see any debug line.

Any idea about this behaviour?

Thank you so much.

Erika

Glenn Sayer
Can you provide more

Can you provide more information.

what is the data type PropertyBag or FixedSchema

sync type - bulk or incremental

partition - app or client

is this occurring on the initial load or a CUD

what is the host service that you are calling.

Sounds like you need to find out what is the bottle neck of why the update is taking to long.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


erika contiero
Data type is PropertyBag,

Data type is PropertyBag, because our app uses dynamic fields;

sync type is incremental;

partition type is user, because every user has different data;

this behavoiur occurs on the initial load with only "query" operations, starting from a reset console and reset devices;

the log on device shows the GET call to http://myserver/application?client_id=f37b839cca254cfdb9a3465911e61581&p_size=10000&version=3&source_name=Mymodel&token=110451848878475

I'm aware of the hugeness of data, and I expect a long data processing time, but I would like to avoid this "timeout"...

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Alexander Babichev
Do not use p_size=10000, as

Do not use p_size=10000, as it might take a long time to build a page, set it to 500.

All log files for linux are located in /opt/nginx/log directory, if above not working look at there ...

And consider to bulk sync instead of incremental.

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


erika contiero
Hi Alexander,thank you for

Hi Alexander,

thank you for your answer, with the log folder I can debug my rhoconnect app!

I tested the p_size=500, and the processing time in rhoconnect increased:

for a model with 6000 records, source adapter query method executed 13 = (6000/500)+1 times, calling 13 times my webservice, waiting 13 times for response, processing 13 times the huge response xml.

I expected a single execution of query, and then 13 response to device, but I think that I can improve my query code, to distinguish between the first execution and the others, so I can reuse the data of the first WS response.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Lars Burgess
Your query method shouldn't

Your query method shouldn't execute that often unless you set the `:poll_interval:` in settings/settings.yml to a very small value.  It should be at least large enough for a full sync cycle to execute before the adapter runs again.

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


erika contiero
Hi Lars,thank you for your

Hi Lars,

thank you for your answer.

I set poll_interval to 0, because my app needs to refresh its data at every sync: if my model takes 300 seconds to sync in the worst case, I can't set poll_interval to 300, because in the best case it can take only 20 seconds, and the next sync, close to the first in this interval, won't refresh my data.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Lars Burgess
In that case I'd recommend

In that case I'd recommend setting it to something inbetween, like 60 or 30 seconds.  Setting it to 0 will ensure your query method is executed every time, even when it doesn't need to.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments