Connection for this process has been disrupted

Running into a problem now that we are mainly working remote. This problem only seems to occur on a WAN and not too much but maybe some on a LAN.

We have a method that loops through records doing a calculation, to improve performance we checked the execute on server check box, and pass in pointers to arrays.

image

Unchecking the execute on server removes the problem, but this isn’t a good longterm solution. I’m wondering if because we are working remote (WAN) that a network port is being closed and not reopened or something similar.

After the error happens the user is disconnected
image

Tested and reproduced with 4D v17R6 and 4D v18

Has anyone seen this or more importantly have a fix for it?
Any suggestions of things to try?

This could mean that many (huge) data is transferred to the server - and then back.
If the network connection is “a little bit” unstable, that could just trigger the issue.

Don’t know about your side, but here in Germany we have seen working from home a very wide range of latency time. Even with fibre wire. That get’s worse using Wifi. I have normally 15-20 ms to the office, now (with Wifi) it is 20-250 ms. And that country side, with neighbours far away, not too many Wifi hotspots close.
As result phone connections are sometimes junky. Switching to cable (Ethernet, not Wifi) produced a way more stable latency time and way better phone connections.

That does not help everyone, as not everyone has an ethernet cable going at home into working room. But if you do, give it a try. You can check if it is related by using terminal and enter ping followed by the IP address of your server. The number in ms should be < 50 (better below 20) and stable.
If it jumps a lot, try with a cable, at least only to test. This shows you if it is wifi related.

You could also try to switch from latency network layer to the new or opposite. Usually the new one works way better with WAN from home, but depending of your environment it could be also other way around.

1 Like

My experience is that this is a local router problem that cuts the line. Routers have normaly many session timeouts and if this is small numbers in sec. they tend to cut it rapidly.

This days with corona, many uses home office. One customer had to drop the wan and use 4G on mobile instead. Others was ok to the same db but on different wans.

example session timeouts:

Right. But v18 needs a minimum timeout of 20 seconds, while routers usually don’t close before 60 seconds, so there should be no need to change settings.

How long is the time for execution of that method, in server environment?

That should not matter. Executing this method and waiting for a result goes through communication via port 19183. This socket is never closed by 4D - and if no data is send/received 4D automatically send a ping every 20 seconds, at least in 17 R6 and 18 (different in 17 and older, there it was depending of settings).
For all database operations triggered by a client it uses 19814, one socket per process, and this sockets are closed (standby/suspended) if no traffic happens for 20 seconds and reopened if needed.

As written:
if using Wifi, try a cable
If it also happens with cable, first try to reverse network layer. If that don’t help, use new layer and enable Diagnostic log on both server and client and send them to tech support (reporting the time when it happens, to ease identification inside that log, which could became very long).

I was asking that because I often have executed loooong “execute on server” methods, and the duration does not seem to cause this error, as Dennis seems to think… It could help to know the data kind and size send back from server.

BTW “execute on server” property and Execute on server command are really too different to share the same name, very confusing. I’d prefer “New process on server” for the second…

I’m using the checkbox in the method “Execute on Server” not the execute on server command. The process I’m running only takes a few seconds, 5 at the most.

It does only happens with remote users, I ran a ping on two isolated users. One had a steady ping of 75ms +/- 5ms the other was all over the place with wireless, but was steady when wired. He will restart his router to see if that helps.

So, whatever is happening, it is not due to a long running method that is set to execute on server. It very well could be due to a poor wireless connection to the router.