Uplink connection timeout

I found that my app was unable to reach out the uplink-connected server code after a few days of diligent work.
The uplinked machine is in AWS and was always on and never disconnected. It run smoothly and silently and the only lines I saw were the ones printed upon successful uplink connection.
I ended up putting a cron-ed script which kills and restarts uplinked code every day, but I wonder why it got disconnected in first place.
It shouldn’t, should it?
Is there a timeout?
Is it due to a server restart on Anvil’s side? I am on free plan.
Does it happen only to me or has anyone had the same experience?

Thanks as usual and BR

It has happened to me. As we are hosting some Uplink code in-house, a disconnect could have many possible causes, including Windows reboots, power glitches, and ISP glitches. I’ll probably never know every possible cause.

Eventually, I intend to have code in-place to monitor connections, and test them periodically, so that when a connection fails, I can be notified, and take action.

In my case, my Uplink code does not have to run on any particular PC. It can run on any PC I have handy. It may not perform as well as a dedicated server, but it’s certainly better than nothing. At least, that can keep things running while I work on the server, or whatever the problem seems to be.

Hi Paul
and thank you for your answer.
In my case the host is in AWS so I don’t think power glitches, disconnections and ISP glitches can be the case.
According to the uptime command, no reboots occurred.
This is why I am so surprised.
The only thing I could think of, is some sort of scheduled reboots in Anvil’s AWS infrastructure dedicated to free plans.
I don’t have any other idea.

Hi, @aldo.ercolani.

I have no experience with AWS (so far), so I have little else to offer, diagnostic-wise.

I easily forget that there are really two problems, in these situations:

  1. Diagnosing the problem.
  2. Finding a way to work in spite of the problem.

I can get so caught up in solving #1, I forget #2! If it’s a personal project, with no consequences for others, then I can afford to put off #2 until I complete #1. Of course, since I may never have enough information to diagnose the problem, that may mean never getting to #2. In other situations, #2 may take priority.

My apologies for not being clearer in my original post. This was intended to help you with #2, in case that was a priority for you:

You may be able to run your Uplink code elsewhere. If so, you can address #2, even if no solution to #1 ever presents itself.

In short, Anvil often lets us get things working anyway, whether we can diagnose the problem or not. This can be especially helpful with networking issues, which may originate in places far beyond our control.

1 Like

Hi Paul
sure I have already found a way around the problem.
As I wrote in the beginning, I set up cron (I’m in linux) to run script that kills and restarts the uplinks, daily.
That is what you call #2, so I’m not blocked at all.
I was just curious to understand #1.

Thanks and BR.