Cloud SQL

gcloud components

List current gcloud config

Set a region

Config store in

Swiitch between multiple gcloud users

Detach a disk from Google Compute Instance

To remove a disk from Google Compute instance, run


Here “indiameds” is name of the disk i want to detach from google compute instance with name “debug-instance”.

Google Cloud only allow detaching secondary disks. Boot disks can’t be detached, only way to detach a boot disk and attach on a new instance is to delete the instance. Make sure you don’t delete the disk along with the instance.

See gcloud


To clear cache, run

Get stats

See Varnish logs

mod_rpaf help with showing users real IP when site is behind a proxy or varnish.

Amazon RDS ERROR 1040 (08004): Too many connections

On an Amazon RDS Aurora data base, when i connect, i get error

This error is due to max_connections setting in MySQL exceeded. By default Amazon RDS set max_connections based on size of RDS instance using following formula.

To see current value, run

To change default value, you need to create a “Parameter group” under Amazon RDS > Parameter groups

On next page, select “Parameter group family” based on what ever RDS version you are using. In this cause i use Amazon Aurora database, so i select “aurora5.6”

Group name and Description, use any value you like, it is just for identification purpose only.

Once created, it will list all available parameter groups. click on newly created parameter group, on next page, it show all options. In the top search box, type in “max_connections” to find the settings. Edit and save.

Now we need to associate this newly created parameter group with Amazon RDS instance, for this go to Amazon RDS > Instances

Select the instance you need to edit, then from “Instance Actions” drop down menu, select modify.

On next page page, you have the option to select “DB parameter group”, select the newly created parameter group.

On next page, you have option to apply change immediately or apply during maintenance window.

You need to reboot the instance to apply the changes.

No space left on device

On a server, when creating new files, i get error – “No space left on device”.

Check disk space with df -h, it shows 129 GB disk space is free

This can be due to inodes getting full, check inodes usage with “df -i”.

As you can use Inodes are all used up.

To find where inodes are used up, run

If you have recent version of du, you can use

This will display all folders with inode usage, sorted by inode usage.