Odoo-mobile / framework

Odoo Mobile Framework
https://play.google.com/store/apps/dev?id=8607973775002477408
Other
327 stars 374 forks source link

RPC_REQUEST_TIME_OUT > 30s not taken in account (capped at 30s) #249

Closed r-mckay closed 7 years ago

r-mckay commented 7 years ago

Hello @dpr-odoo ,

https://github.com/Odoo-mobile/framework/commit/8c56569398d766c1bbcb759d537e68cf2a330646 seems to not solve our issue (#217).

Here is a stacktrace. You will see that there is an exception 30s after the request. We are performing a sync, not a call. For instance, we have in OConstants.java in this example.

RPC_REQUEST_TIME_OUT = 120000; // 120 Seconds

Could you please look at this? Thank you.

Could you also look at #222 ? Thank you.

17:28:00.388 ./...:sync D/OdooLog: [9196] OdooWrapper.newJSONPOSTRequest: REQUEST URL : http://.../web/dataset/search_read 17:28:00.389 ./...:sync D/OdooLog: [9196] OdooWrapper.newJSONPOSTRequest: POST DATA ... 17:28:30.428 ./...:sync D/OdooConnector: [1] MarkerLog.finish: (30039 ms) [ ] http://.../web/dataset/search_read 0x6c2c032f NORMAL 5 17:28:30.429 ./...:sync D/OdooConnector: [1] MarkerLog.finish: (+0 ) [9196] add-to-queue 17:28:30.429 ./...:sync D/OdooConnector: [1] MarkerLog.finish: (+1 ) [9198] cache-queue-take 17:28:30.429 ./...:sync D/OdooConnector: [1] MarkerLog.finish: (+15 ) [9198] cache-hit-expired 17:28:30.429 ./...:sync D/OdooConnector: [1] MarkerLog.finish: (+0 ) [9200] network-queue-take 17:28:30.430 ./...:sync D/OdooConnector: [1] MarkerLog.finish: (+10010) [9200] socket-retry [timeout=10000] 17:28:30.430 ./...:sync D/OdooConnector: [1] MarkerLog.finish: (+20013) [9200] socket-timeout-giveup [timeout=20000] 17:28:30.430 ./...:sync D/OdooConnector: [1] MarkerLog.finish: (+0 ) [9200] post-error 17:28:30.431 ./...:sync D/OdooConnector: [1] MarkerLog.finish: (+0 ) [ 1] done 17:28:30.433 ./...:sync E/OdooLog: [9196] OdooWrapper.newJSONPOSTRequest: java.util.concurrent.ExecutionException: com.android.volley.TimeoutError at com.android.volley.toolbox.RequestFuture.doGet(RequestFuture.java:117) at com.android.volley.toolbox.RequestFuture.get(RequestFuture.java:97) at odoo.wrapper.OdooWrapper.newJSONPOSTRequest(OdooWrapper.java:268) at odoo.wrapper.OdooWrapper.searchRead(OdooWrapper.java:737) at odoo.wrapper.OdooWrapper.searchRead(OdooWrapper.java:708) at com.odoo.core.service.OSyncAdapter.syncData(OSyncAdapter.java:180) at com.odoo.core.service.OSyncAdapter.onPerformSync(OSyncAdapter.java:132) at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:272) Caused by: com.android.volley.TimeoutError at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:143) at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:112)

kasim1011 commented 7 years ago

@r-mckay can you try out using this eclipse base sample? please, tell us time out is still coming or not using this.

dpr-odoo commented 7 years ago

@r-mckay Can you put code how you are calling the method ?

r-mckay commented 7 years ago

Hello @dpr-odoo , thank you for your answer.

I managed to make it work with #253. This is a proposition of implementation, can you please look at it and tell me what you think about it in the PR?

Concerning the way I am calling the synchronization, I currently call SyncUtils.requestSync() for my entity / entities. Moreover, other calls to newJSONPOSTRequest can be caught, coming from other parts of the Odoo RPC code, but they are independent from the sync.

Thank you!

dpr-odoo commented 7 years ago

PR Merged https://github.com/Odoo-mobile/framework/commit/552181277fdacbf549f7b0631366fbe0bee2f8ac