Losing DDP connection

I have a web app that is actually split in 2 Meteor apps, one for the logic, the other one for the UI. Both are communicating via DDP.connect. It was working well, but since a few days, my UI app get disconnected from the logic app after a couple of minutes. I just need to restart the “logic” app and it works, but 2 minutes after it disconnects again.

I really don’t know how to debug this problem. Any help would be great!

Here is the websocket messages from Chrome dev tools:

1	
10:51:13.250
["{\"msg\":\"connect\",\"version\":\"1\",\"support\":[\"1\",\"pre2\",\"pre1\"]}"]	81	
10:51:13.251
["{\"msg\":\"sub\",\"id\":\"qCHWLXPB73ke4wW7J\",\"name\":\"records\",\"params\":[]}"]	85	
10:51:13.251
a["{\"server_id\":\"0\"}"]	26	
10:51:13.251
a["{\"msg\":\"connected\",\"session\":\"GRctDfShxi773HpRq\"}"]	62	
10:51:13.257
a["{\"msg\":\"added\",\"collection\":\"Records\",\"id\":\"Hjsa7JWoJFMgzDkmu\",\"fields\":{\"name\":\"grand\",\"sampleTime\":11103000,\"state\":\"stopped\",\"datetime\":{\"$date\":1512662232939}}}"]	197	
10:51:13.265
a["{\"msg\":\"added\",\"collection\":\"Records\",\"id\":\"veL85PuErqNxw9yta\",\"fields\":{\"name\":\"grand 2\",\"sampleTime\":2000,\"state\":\"started\",\"datetime\":{\"$date\":1512662811267},\"communicationDown\":true}}"]	222	
10:51:13.266
a["{\"msg\":\"added\",\"collection\":\"Records\",\"id\":\"k6yeZa8sGoYpNEFwo\",\"fields\":{\"name\":\"test 34\",\"sampleTime\":2000,\"state\":\"started\",\"datetime\":{\"$date\":1512663154872},\"communicationDown\":true}}"]	222	
10:51:13.267
a["{\"msg\":\"added\",\"collection\":\"Records\",\"id\":\"ngR7pfhnxgym9AYrC\",\"fields\":{\"name\":\"toto\",\"sampleTime\":2000,\"state\":\"notStarted\",\"datetime\":{\"$date\":1518190838983}}}"]	195	
10:51:13.267
a["{\"msg\":\"added\",\"collection\":\"Records\",\"id\":\"HzNEqQkE6uYgH3kg9\",\"fields\":{\"name\":\"toto\",\"sampleTime\":2000,\"state\":\"notStarted\",\"datetime\":{\"$date\":1518191024047}}}"]	195	
10:51:13.268
a["{\"msg\":\"added\",\"collection\":\"Records\",\"id\":\"JbmNhckMyGz2hRR26\",\"fields\":{\"name\":\"popo\",\"sampleTime\":2000,\"state\":\"notStarted\",\"datetime\":{\"$date\":1518191156552}}}"]	195	
10:51:13.268
a["{\"msg\":\"added\",\"collection\":\"Records\",\"id\":\"Wx4taWR4d2gZKFr57\",\"fields\":{\"name\":\"toto\",\"sampleTime\":2000,\"state\":\"notStarted\",\"datetime\":{\"$date\":1518193283769}}}"]	195	
10:51:13.268
a["{\"msg\":\"added\",\"collection\":\"Records\",\"id\":\"bMcbQEHRq6HRW8o8Q\",\"fields\":{\"name\":\"toto\",\"sampleTime\":2000,\"state\":\"notStarted\",\"datetime\":{\"$date\":1518196788912}}}"]	195	
10:51:13.268
a["{\"msg\":\"ready\",\"subs\":[\"qCHWLXPB73ke4wW7J\"]}"]	57	
10:51:13.268
a["{\"msg\":\"ping\"}"]	23	
10:51:43.261
["{\"msg\":\"pong\"}"]	22	
10:51:43.262
["{\"msg\":\"ping\"}"]	22	
10:52:06.154
a["{\"msg\":\"pong\"}"]	23	
10:52:06.490
["{\"msg\":\"ping\"}"]

I see a last ping, then no “pong”. I don’t know what to do…