Schedule GCE instance periodic restart - google-compute-engine

I have a GCE instance running. Is there a way to schedule periodic restart?
I'm asking because I have a memory leak in JVM that I can't solve with out restarting the instance. Right now I restart it manually but it would be nice to automate it.

Related

Bitnami MySQL Chart - Replication and TLS

Quick question for anyone familiar with MySQL Helm charts by Bitnami:
Does anyone know if it's possible to configure a replication cluster with TLS enabled between the primary/secondary instances?
I was able to easily get replication cluster up and running without TLS, but I can't see anything baked into the chart about enabling TLS for replication purposes. I tried using an init script to accomplish this based on instructions here, but could not login as root on the replica instances at the point that init scripts run.
I almost wonder if I need to create another container that waits for them to start, then connects and runs that script?

Beanstalk RDS instance restart causing application downtime

I was trying to deploy a new application version for my python beanstalk environment. While deploying the version, the associated RDS instance shutdown and restarted and it took almost 2 hours. Also the db instance class and the allocated storage changed automatically, application had downtime for almost 2 hours. How i can troubleshoot the reason for the RDS restart/update on the application deployment time.
Please advice

Laravel 5.4 queue:restart on windows?

I am learning laravel 5.4 "queues" chapter. I have a problem about queue:restart command. Because when I test it on my windows 10 platform, I found this command seems just kill queue worker, but not restart worker. So I wonder whether this command does not work on windows or this command is just kill worker but not restart worker? Thanks.
The queue:restart command never actually restarts a worker, it just tells it to shutdown. It is supposed to be combined with a process manager like supervisor that will restart the process when it quits. This also happens when queue:work hits the configured memory limits.
To keep the queue:work process running permanently in the background, you should use a process monitor such as Supervisor to ensure that the queue worker does not stop running.
Source: https://laravel.com/docs/5.4/queues#running-the-queue-worker

What is difference between snapshot, image and persistent disk on Google Compute Engine?

I have a compute engine instance on google cloud which is running fine. user base is increasing and I wish to upgrade to a bigger compute engine in terms of cpu and memory.
What is the most easy way to do such migration?
What is the snapshot, image, persistent disk features in google compute engine? Are they anyway useful to my task?
I figured it out. Lennert answer is good. I will add few more things to complete it. You can always stop a VM, edit the CPU/memory and restart the VM. But this action may change the external IP address and cause lot of issues. You can handle it but it may cause further downtime. You may have to update the new IP address at DNS and inside the code. One way to avoid this hassle is that you should Reserve a static IP adreess [in console, go to NETWORKING > EXTERNAL IP ADDRESS > RESERVE A STATIC IP ADDRESS]. If you do this, your ip address will not change once you restart the VM.
Image is aka Operating System. While creating a VM, you are asked to choose a boot disk, disk which is used to boot your VM from. You can select from pre-defined images.
Snapshot is the copy of the disk. If it is a boot disk, it contains the operating system image too. We can create a snapshot of an existing disk and use it as the boot disk while creating new VM.
Persistent Disk is the disk that can persists even if you delete the VM [provided you have deselect the option of deleting it while deleting the VM]. We can delete VM and use a persistent disk to create new ones. We can simply pay for persistent disk only, without having any VM.
The easiest way is to stop the machine, change the machine type from the console and start the machine again. No need to create backups (snapshots), new VM's, etc.

Can't Connect to (or start?) Google Cloud Compute Instance

I attempted to restart my Windows instance (using the Start menu), but haven't been able to connect to it. After a few hours of waiting, I also tried using the Reboot button in the Google Developers Console. That didn't work either. I can't RDP into it, or even ping it. However, when I look at the instance in the GDC, it's been steady at 27% CPU usage for the duration. Anyone know what's going on or how to fix it?
You can run this gcutil command to reset the instance: gcutil --project=[project-id] resetinstance [instance-name]
If this has no effect, a suggestion would be to delete the instance without deleting the boot disk and then create a new instance with that disk. This will ensure that you get a fresh instance without losing any of your previous data.