Difference in docker restart policy between on-failure and unless-stopped?

on-failure will issue a restart if the exit code indicated a failure, whereas unless-stopped behaves like always and will keep an instance running unless the container is stopped. You can try with the hello-world to see the difference. docker run –restart on-failure hello-world will run once and exit successfully, and running a subsequent docker ps … Read more

How to send a custom command to a .NET windows Service from .NET code?

You can send “commands” to a service using ServiceController.ExecuteCommand: const int SmartRestart = 222; var service = new System.ServiceProcess.ServiceController(“MyService”); service.ExecuteCommand(SmartRestart); service.WaitForStatus(ServiceControllerStatus.Running, timeout); You’ll need to add a Reference to the System.ServiceProcess.dll assembly. The service can react to the command by overriding ServiceBase.OnCustomCommand: protected override void OnCustomCommand(int command) { if (command == SmartRestart) { // … … Read more

pause vs stop in docker

The docker pause command suspends all processes in the specified containers. On Linux, this uses the cgroups freezer. Traditionally, when suspending a process the SIGSTOP signal is used, which is observable by the process being suspended https://docs.docker.com/engine/reference/commandline/pause/ The docker stop command. The main process inside the container will receive SIGTERM, and after a grace period, … Read more

Stop MySQL service windows

On Windows If you are using Windows Open the Command Prompt and type To Stop MySQL Service: net stop MySQL80 To Start MySQL Service: net start MySQL80 On Linux # /etc/init.d/mysqld start # /etc/init.d/mysqld stop # /etc/init.d/mysqld restart Fedora / Red Hat also support this: # service mysqld start # service mysqld stop # service … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)