I’m not sure how you manage your services. But I really don’t believe that it silently exits. And if it does, you need to check for its exit code, perhaps it gets killed by the system via a signal?
Have you checked systems log if OOM killer strikes?
Debian 10 managed by Webmin. The var/log/message contained nothing but normal messages: rsyslogd was HUPed and var/log/stderr is empty.
There is no other process but http.Server running and it is terminated repeatedly by some reason. Either fmt.Println(err) or log.Fatal is reporting any issues. The memory used does not exceed 30 percent.
HTML, CSS and Javascript is validated. And other Go servers on the same server runs perfect on other ports.
I have activated the Firewall, but so far no difference.
I don’t know webmin, but fmt.Println prints to stdout. Not sure what webmin does with what happens on stdout.
Make sure to use whatever logging mechanism usually works for you.
Also make sure that all your endpoints properly log.
Extensive logging is probably the only thing that can help you debugging this.
Also, your service manager should be either able to recognize failure and restart your service, or if it can’t, then it should be replaced. Systemd is pretty good at just doing the right thing.
And again, when your service exits, what exit code does it have?
Not sure what exactly you mean by that. But if its a file, then open it and write your logs to it. How to do that exactly depends on the logging library you use.
log.Fatal will always log to the processes stderr/fd:2 and then exit the program.
Systemd as well as docker usually take stdout and stderr of a program and write them into their logs, which you can then browse by service/container.
I have no clue how your webmin deals with such stuff.