3 ms·
Seriously? If something crashes continuously in production then the solution is "just pass the --restart=always flag. I really wonder if you guys are really usi
by tigershark 10y ago
Seriously?
If something crashes continuously in production then the solution is "just pass the --restart=always flag.
I really wonder if you guys are really using docker in prod.
I would never use something like that to manage important transactions.
- X86BSD 10y agoNo the correct solution is to debug the issue not just reboot/restart/reinit the damn thing. This mentality is WHY Linux/docker/containers/Linux worlds NIH syndrome, is such a tire fire.
- chewchew 10y agoIt's not one or the other. Restarting might save you some downtime if you're running a single IRC container. That doesn't mean you shouldn't find and resolve the root issue. Normally I just rollback to the previous version container if I have a recurring issue. Windows containers are now available, if you can't stand linux: https://msdn.microsoft.com/en-us/virtualization/windowscontainers/about/about_overview https://msdn.microsoft.com/en-us/virtualization/windowsconta... Anyway, don't use containers if you don't want to. I'm glad I invested the time since I understand them very well and use them to my advantage. But I did have to learn a lot and experiment with a bunch of tools, and maybe that's not worth it to you.
- LgWoodenBadger 10y agoIsn't this the much-lauded and respected Erlang approach to failures?
- tigershark 10y agoI never used Erlang, so I have no idea if it follows the same approach(although I find it quite strange). But for sure I can't afford to deploy anything like that in prod. You lose one transaction in the middle and several millions go lost. I'd rather lose an hand than try to explain my clients that it is fine, docker just restarted by itself as expected..
- chewchew 10y agoAs someone said, this is the normal behavior in the Erlang/Elixir world, and it seems to have worked extremely well for the telecom industry. That said, my reply was to someone running an IRC server, presumably on a single server, so don't stretch my advice to a production app handling millions of transactions. Obviously the core issue is that the app crashes, and it's still up to him to fix that. This is almost certainly a problem with his app/config, not Docker itself (though it ain't perfect). If it's something that happens every 6 months, then auto restarting will probably save him a lot of problems. If your transactions are so precious, don't pass the flag- it's up to you.