UPDATE: Turned out that the culprit of the downtime was my switch - the D-Link DGS-1210-10P rev. B1.
The way the management web interface of the switch works is pretty unintuitive. Namely, if you change some settings in the web interface and hit save in one of the sections, the settings are saved in the volatile memory of the switch. This basically means that the settings are only saved in RAM, which is cleared on power loss. To save the settings into non-volatile memory which persists on reboots, you need to find the “Save” section at the top of the UI. This is described here: https://networkengineering.stackexchange.com/questions/20158/dlink-switch-loses-configuration-on-power-off
So basically, my problem was that the settings weren’t commied to nonvolatile memory and on a short 1 minute power loss the switch restarted.
I got an UPS anyway now, SMT750RMI2U
The generated password lenghts can be set in the UI at least. It’s worse when the password form accepts only SOME special symbols (looking at you bank)