0
votes

Currently I have encountered an issue about the client app attempting to call Worklight server services every < 1s. Here is the log produced from LogCat.

From my experience, if the server cannot be connected, there will not be so many request attempting to connect to Worklight server.

May I know if there is any setting problem instead?

08-29 23:20:51.949: D/MobileTreeApp(11294): Request [https://xxx:443/xxx/apps/services/api/xxx/android/query]
08-29 23:20:52.114: D/MobileTreeApp(11294): Request [https://xxx:443/xxx/apps/services/api/xxx/android/query]
08-29 23:20:52.289: D/MobileTreeApp(11294): Request [https://xxx:443/xxx/apps/services/api/xxx/android/query]
08-29 23:20:52.459: D/MobileTreeApp(11294): Request [https://xxx:443/xxx/apps/services/api/xxx/android/query]
08-29 23:20:52.639: D/MobileTreeApp(11294): Request [https://xxx:443/xxx/apps/services/api/xxx/android/query]
08-29 23:20:52.809: D/MobileTreeApp(11294): Request [https://xxx:443/xxx/apps/services/api/xxx/android/query]
08-29 23:20:52.979: D/MobileTreeApp(11294): Request [https://xxx:443/xxx/apps/services/api/xxx/android/query]

EDIT2:

This only happens in Worklight cluster.

Environment: Worklight 5.0.6, WAS ND 8.5

1
Not sure if this is the heartbeat from client to server, but maybe this helps: WL.Client.setHeartBeatIntervalcnandreu
I will give a try but I think if it is the heartbeat from client to server, the URL will be something like "xxx:443/xxxxx/heartbeat". Moreover, the default setting of heartbeat should be 7 mins if I remember correctly. There will not be so frequent request ...red23jordan
Oh, you're right, it doesn't look like it's a heartbeat. Ignore my comment.cnandreu
Hi cnandreu, I found that this only happens in cluster. Do you have any idea why is it so?red23jordan
All requests fail? WL server is not stateless. In a clustered environment you must guarantee that a client will always communicate with the same server that initialized the session. There's a page in the docs that goes into more details, specifically it says ensure that session affinity is enabled. Maybe you can use Wireshark or Charles Proxy and logs to provide more info regarding the session?cnandreu

1 Answers

0
votes

When session affinity is enabled, this problem is resolved.