Tuesday, June 30, 2020

[google-cloud-sql-discuss] Cloud SQL private IP access via VPN Tunneling

I have two projects 1 and 2 and two vpc networks vpc1 and vpc2 in the respective projects. I need to connect to sql instance in vpc2 (project2) from vm in vpc1 project1 using private IP. After trying diiferent methods and exploring options like vpc peering, cloud NAT (which wouldn't work for me) I found the cloud VPN solution. I am following this google docs link - https://cloud.google.com/sql/docs/postgres/configure-private-ip#vpn to connect to cloudSQL instance using its private IP. I have setup VPN Tunneling and all the necessary steps that were mentioned in the steps 1 and 2 in the link itself, but not able to connect to the instance. I have tested the VPN connectivity as well. I am able to ping a vm2 in vpc2 (project2) from vm1 in vpc1 (project1).

I suspect the problem is in the final steps over here:
https://i.stack.imgur.com/aIyq8.png

No problem in step a and step b is also clear, but what exactly needs to be done in step c is not clear. Can you explain what needs to be done over there.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/852aeca5-3039-4305-a4ec-e32991c73720o%40googlegroups.com.

Saturday, June 27, 2020

[google-cloud-sql-discuss] Re: How to put html file into my wordpress website hosting with google cloud?

Hello,
I doubt that this issue is related to Cloud SQL since you have mentioned buckets from Cloud Storage and hosting a WordPress website Google Cloud. You might get better support if you bring your inquiry to StackOverflow or Issue Tracker.

It would be useful to get more context on your situation and your set-up to get the appropriate support. For example, are you following any documentation to host your wordpress website? Where are you encountering difficulties?
Since you are mentioning putting a HTML file and Cloud buckets, are you trying to host a static website using Cloud Storage?

As for your second inquiry, I believe that storage.googleapis.com/bucket/object is the only way to get an object from storage asides from using the object's link URL storage.cloud.google.com/bucket/object; given that you have the correct permissions. Both are long and I do not think the links can be shortened according to documentation.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/b2e32e4f-9b85-4928-93e3-341955b31340o%40googlegroups.com.

[google-cloud-sql-discuss] Re: cant export from pgadmin to csv on mac (permission denied)

Hello,
This is a discussion group for the Cloud SQL product, which is not affiliated to pgAdmin. For that reason, the support you would get for permission issue your are facing with pgAdmin would be limited here.

Nevertheless, I have found a Stack post for the same error message when attempting to import a file on Windows 7. That error is likely caused by the user not having read permission to that file, and needs to be added.
Since that way to modify permissions is for Windows, you would need to do so using Mac's Terminal.

Alternatively, I believe that this article might interest you, as it mentions the use of psql's \copy, just like the error message, and the pgAdmin GUI. For psql, the command would be `$ \copy table_name to 'filename.csv' csv header` as per this link.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/8f50df65-ef01-460d-9bbd-2d6227e15baao%40googlegroups.com.

[google-cloud-sql-discuss] Why does my instance overview show no data available on "Active connections" chart?

The issue seems to have started after migrating to PostgreSQL 12.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/df7a0c0c-cfe7-4b1e-90f6-eff4394464abn%40googlegroups.com.

Friday, June 26, 2020

[google-cloud-sql-discuss] cant export from pgadmin to csv on mac (permission denied)

Hello,

Im trying to export table data from PGadmin as follows:

COPY db_name.table_name TO '/tmp/New Folder/first_list_data.sql' DELIMITER ',' CSV HEADER


And I get the error:

ERROR: could not open file "/tmp/New Folder/first_list_data.sql" for writing: Permission denied HINT: COPY TO instructs the PostgreSQL server process to write a file. You may want a client-side facility such as psql's \copy. SQL state: 42501

how can I allow PGadmin to export this file to my mac?

thanks




--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/c041229e-f499-4605-a5c3-9364623ed044n%40googlegroups.com.

[google-cloud-sql-discuss] How to put html file into my wordpress website hosting with google cloud?

Hi all, 

can help me to find solution
1. How to put html file into my wordpress website hosting with google cloud?
2. can i remove "storage.googleapis.com" word in the link extention in google cloud.bucket. 
https://storage.googleapis.com/[BUCKET_NAME]/[OBJECT_NAME]
or any solution to make my link shorter? 

thanks

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/b7cbeae5-a09d-46c5-8216-fe9179cb2c9eo%40googlegroups.com.

Wednesday, June 24, 2020

[google-cloud-sql-discuss] Re: Hey can anyone guide me to Install my php Web app on cloud

Hello,

This forum is for Google Cloud SQL. It looks like you need help setting up a Virtual Machine for your Web application. If you can provide more context on how to make it run, maybe we can find a better place to answer your questions.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/48e03ddb-4a26-4288-9f79-43e33c7cf073o%40googlegroups.com.

[google-cloud-sql-discuss] Re: What is the closest role I could get as sysadmin on GCP sqlserver

Hi Zayar,

The closest would be the default sqlserver user which is created at the time the Cloud SQL server is created. You can find more information on its permission here. You can also create new users with new roles by following the steps provided here.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/b4fcce6a-69c4-4f32-8640-fd7d55a3a2e6o%40googlegroups.com.

Tuesday, June 23, 2020

[google-cloud-sql-discuss] Re: gce and cloudSQL (mysql 5.7) cannot connect. I can't type password.

I was able to log in safely. Thank you.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/1f047fdd-66b0-4e0c-9f92-444e4e25ed0ao%40googlegroups.com.

[google-cloud-sql-discuss] Re: Allow the always free f1-micro in GCE to intersect with db-f1-micro

Hello.

I have routed your request over to the Cloud SQL product team as they are the ones that decide to implement feature requests that enhance the Google Cloud Platform.

As this is a Feature request, I cannot guarantee that it will be implemented, but rest assured that your feedback is taken into consideration. I highly suggest that you "+1": yourself on this Public Issue Tracker as this is where all new updates regarding this feature will be made.

Cheers.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/f820d3aa-08ae-4c5a-93d5-98460cb665f6o%40googlegroups.com.

[google-cloud-sql-discuss] Re: gce and cloudSQL (mysql 5.7) cannot connect. I can't type password.

Hi!

Great question. What you are facing is a Linux/ Unix/ Shell (call it what you want) security feature. This is a common question and its purpose is to add the extra layer of security by not displaying the number of characters in a password.

In order to resolve this issue, you should type in your password even though the cursor doesn't move and then hit ENTER. If the password is correct, you will be allowed to log in.

Here is a post from the Unix Stackexchange and one from an Ask Ubuntu. Both of these are great resources.

Hope that helps.

Cheers

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/58ae1b9e-3f23-41d9-a0af-17b9334ccc25o%40googlegroups.com.

[google-cloud-sql-discuss] Re: Google Cloud Compute Instance doesn't work as expected with startup script

Hello,

Let me see if I can help and if I understood properly.

I think those[1] steps you mentioned are for stateful configurations, unless you've setup volumes with your container. And I'm also not sure how how the state of the image is carried to the GCE instance. The image and script may be incompatible in some respect. The issue seems to be after you add the script to the docker image. I'm thinking that it might be better to put the SQL Proxy as part of the container, unless there's a specific reason you don't want to do that. There's an entire article here[2] that reflects exactly what you are trying to do. In that article there's a Proxy Docker image that could save you lots of trouble.

[1] https://cloud.google.com/sql/docs/mysql/sql-proxy#install
[2] https://cloud.google.com/sql/docs/mysql/connect-docker#connect-client

On Monday, June 22, 2020 at 11:15:04 AM UTC-4, I-On Project Integration wrote:
I've created an Google Cloud Compute Engine Instance Template where I specify a docker container image to be used (hosted privately on Google Container Registry).
For my app I need to have Google Cloud Sql Proxy running, so I followed these steps and added a startup script on my Compute Engine Instance Template like this:

    #! /bin/bash
    wget https
://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64 -O /var/lib/google/cloud_sql_proxy
    chmod
777 /var/lib/google/cloud_sql_proxy
    sudo
/var/lib/google/cloud_sql_proxy -instances={instance name} &

The issue I have is that when I create an Compute Engine VM Instance based on this template
   
gcloud compute instances create {instance name} --source-instance-template {template name}

The instance is created and starts and I can see that cloud_sql_proxy script is running, BUT the docker image is not pulled neither does the container starts...

I've tried to create an Compute Engine VM Instance without specifying the startup script and it works correctly, the docker image is pulled and the container starts running.
And with the Compute Instance running, I've connect via ssh and start the cloud_sql_proxy script manually and everything works (the apps connects successfully to the SQL instance on Google Cloud SQL).
But I want to have this automated...

What am I missing? Has anybody had this issue?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/f4736b80-574e-419b-8f80-463f3e4eab67o%40googlegroups.com.

[google-cloud-sql-discuss] Hey can anyone guide me to Install my php Web app on cloud

I want to install my web app on server which need apache2, Mysql, Phpmyadmin, Php 7.2. I have allready istalled it. Also I have uploaded my Web app data to VM instances through file Zilla. But I am not getting how to make it run. Plz Help.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/32b89a7e-e91c-4fd3-ab40-19859cc8cfd5o%40googlegroups.com.

[google-cloud-sql-discuss] What is the closest role I could get as sysadmin on GCP sqlserver

Hello Guys,
I am a newbie mssql database administrator. I am practicing my lessons on GCP.
I am aware that GCP doesn't support sysadmin role at sqlserver level.
What I am curious is how can I get the closest role as sysadmin on GCP?

I was trying to restored .bak from my local disk drive and its throwing me this error. Appreciate if anyone can enlighten me on this.
Cheers
Zayar.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/3b0666fb-214c-4843-bb40-6797f29c476co%40googlegroups.com.

Sunday, June 21, 2020

[google-cloud-sql-discuss] gce and cloudSQL (mysql 5.7) cannot connect. I can't type password.

Environment
OS ubuntu
Browser Chrome Latest
Tried editor cloud 9 and cloud shell

I read the connection Doc and tried many times, but I can't enter the last password for the connection settings.
As I cannot input the last password, it is not a connection failure of the keyboard.

input command
ubuntu @ instance -1: ~ $mysql --host = ' my sql ip ' --user = root --password
Enter password: (Location that cannot be entered)

I can't type, so I get an error when I press the Enter key.
ERROR 1045 (28000): Access denied for user 'root'@'gce ip' (using password: YES)

I tried it on cloud Shell or cloud9 with an SSH connection, but I can't input.
Please help me.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/3a557f29-b932-4d12-9e71-372661a86c1co%40googlegroups.com.

[google-cloud-sql-discuss] Google Cloud Compute Instance doesn't work as expected with startup script

Google Cloud Compute Instance doesn't work as expected with startup script

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/17c70e50-492f-49a3-bc8d-f8ebfac8b80co%40googlegroups.com.

[google-cloud-sql-discuss] Google Cloud Compute Instance doesn't work as expected with startup script

I've created an Google Cloud Compute Engine Instance Template where I specify a docker container image to be used (hosted privately on Google Container Registry).
For my app I need to have Google Cloud Sql Proxy running, so I followed these steps and added a startup script on my Compute Engine Instance Template like this:

    #! /bin/bash
    wget https
://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64 -O /var/lib/google/cloud_sql_proxy
    chmod
777 /var/lib/google/cloud_sql_proxy
    sudo
/var/lib/google/cloud_sql_proxy -instances={instance name} &

The issue I have is that when I create an Compute Engine VM Instance based on this template
   
gcloud compute instances create {instance name} --source-instance-template {template name}

The instance is created and starts and I can see that cloud_sql_proxy script is running, BUT the docker image is not pulled neither does the container starts...

I've tried to create an Compute Engine VM Instance without specifying the startup script and it works correctly, the docker image is pulled and the container starts running.
And with the Compute Instance running, I've connect via ssh and start the cloud_sql_proxy script manually and everything works (the apps connects successfully to the SQL instance on Google Cloud SQL).
But I want to have this automated...

What am I missing? Has anybody had this issue?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/43784a2a-2d3d-43b0-bd22-d971f6340e47o%40googlegroups.com.

[google-cloud-sql-discuss] Allow the always free f1-micro in GCE to intersect with db-f1-micro

It'd be a very nice (or horrible) idea to do this. I want to use f1-micro GCE for free too in Cloud SQL.

I currently have to resort to using Container Optimized OS and deploy my manually written Postgres Docker Compose recipe over there.

Although this means Google want to give me more freedom (?) so I can have the possibility to even deploy more applications such as Redis, MariaDB or any Docker image as much as possible...except when I realized I will have an OS overhead of about 200MB (My initial testing shows it, not sure in the long term) and this could have had been better utilized into a one single uni-database instead.

So I'm just asking. I can still cope a little with my current setup (and perhaps set a hard 0.1 CPU and 384MB memory limit in Docker)

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/75a62643-8fc3-4fa7-95ba-ce3a866a86c5o%40googlegroups.com.

Tuesday, June 16, 2020

[google-cloud-sql-discuss] Re: Increased rate of "MySQL server has gone away" errors

Hello, 

Have you gone through the Issue link[1] referenced by George in one of Messages? I recommend that you do that as this issue may be related. 

That being said, I believe there are a number of reasons that may be responsible for this type of errors. For example, I gathered that this error message may be reported following errors about attempts at reading communication packets. 

Of course, when you have errors about communication packets, it often suggests that an existing connection is perhaps terminated improperly. Aborted connections happen because of unclean's connection closure, or a networking issue between the Cloud SQL MySQL instance and the client.

Whether or not this is the situation on your Case would require reviewing your Project/setup and the logs to understand what led to the errors, which is why I recommend that you contact the GCP Support Engineers[2] so that the team could help with determining the cause of the error particularly on your CloudSQL Instance. 

[1]https://issuetracker.google.com/35904221
[2]https://cloud.google.com/support-hub

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/0c428a9c-2e92-4538-8a7d-0e0064e76b98o%40googlegroups.com.

Monday, June 15, 2020

[google-cloud-sql-discuss] Re: Increased rate of "MySQL server has gone away" errors

Hi, 

Even we have the same issue. Every Monday I see this error "MySQL error has gone away". I have set the parameters sufficient enough "wait_time" and 'allowed_packet _size'. No idea why this is happening.

On Tuesday, 28 February 2017 09:24:20 UTC+11, geoffre...@gmail.com wrote:
Hello,

As of today we're seeing an increased rate of "MySQL server has gone away" errors when connecting to our Cloud SQL 2G instance. Prior to today we might see this error once every few months, but today we've seen it 6 times according to App Engine Error Reporting and 18 times according to our App Engine logs. 

I do not see an update operation on our instance, so any thoughts on where to start looking would be greatly appreciated.

Best,
Geoff.


--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/d9c8948d-2f7e-45a5-a263-c2180fae8899o%40googlegroups.com.

[google-cloud-sql-discuss] Re: MySQL load balancing

Hello,

According the the official Google documentation here, Cloud SQL does not provide load balancing between replicas.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/083f2e63-b7b9-4404-abd4-e414176040d5o%40googlegroups.com.

Sunday, June 14, 2020

[google-cloud-sql-discuss] MySQL load balancing

Can we able to do load balance between mysql databases ?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/fcfdbcee-f7c8-4f08-843c-ec884bb5debdo%40googlegroups.com.

Saturday, June 13, 2020

[google-cloud-sql-discuss] Re: Are there alternatives for CloudSQL PostgreSQL logical replication for now?


We have been patiently waiting for external replica functionality for about a year now. 
Disappointed that this is not available, and it makes Google Cloud Platform seem very immature compared to Amazon.

D

On Wednesday, June 20, 2018 at 7:47:59 AM UTC-7, Daniel Franco wrote:
Currently, Google Cloud SQL for PostgreSQL does not support logical replication. 
However, I need to build a sync service between two databases (one Cloud SQL instance and one External Database instance).
Some of the tables of the External Database must work as a master table and some as slave tables. The same applies to the Cloud SQL instance.
Also, I don't necessarily need to stream the changes. It could be run in a batch.
I need to use CloudSQL and not GCE for this.

Is there an alternative way to do logical replication leveraging PostgreSQL's WAL in CloudSQL? The only option I can see to gather the CDC is by using triggers, but that implies in overhead in both databases and other issues as well.
I don't know if Google Cloud Dataflow would be an overkill for this situation.

Thanks in advance. I would be really grateful if someone could help me on this. 

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/5c8088f0-e242-4b60-b1ff-e08070cf2799o%40googlegroups.com.

Wednesday, June 10, 2020

[google-cloud-sql-discuss] Re: Postgres 11 Ubuntu 18.4 - Randomly crashing

I VMs on GCP.

On Wednesday, June 10, 2020 at 5:07:36 PM UTC-6, Elliott (Google Cloud Platform Support) wrote:
Hello Juan,

Are you using Cloud SQL or Virtual machines on Google Cloud?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/19d536a7-fedb-4f88-b23c-6394823cd29co%40googlegroups.com.

[google-cloud-sql-discuss] Re: Postgres 11 Ubuntu 18.4 - Randomly crashing

Hello Juan,

Are you using Cloud SQL or Virtual machines on Google Cloud?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/be874936-5579-49e2-bd92-a87de024e7f0o%40googlegroups.com.

[google-cloud-sql-discuss] Postgres 11 Ubuntu 18.4 - Randomly crashing

We have 2 servers for postgres master and replica, the second one is used only for reporting it has 23GB memory and 16 vCPU and a database of almost 200GB of memory

Randomly postgres is being killed by Linux with the following message

Jun 10 05:51:18 db02 kernel: [595622.012354] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/system.slice/system-postgresql.slice,task=postgres,pid=28305,uid=112
Jun 10 05:51:18 db02 kernel: [595622.012382] Out of memory: Killed process 28305 (postgres) total-vm:10918716kB, anon-rss:2963608kB, file-rss:0kB, shmem-rss:5741588kB
Jun 10 05:51:18 db02 kernel: [595622.199406] oom_reaper: reaped process 28305 (postgres), now anon-rss:0kB, file-rss:0kB, shmem-rss:5741588kB

Which as far as I know is when Ubuntu has to kill one process to keep the OS working.

These are the settings I have in postgres.conf file

related to memory

# - Memory -

shared_buffers = 6GB                                             
temp_buffers = 18MB                     # min 800kB
work_mem = 32MB                         # min 64kB
maintenance_work_mem = 1536MB           # min 1MB
effective_io_concurrency = 200          # 1-1000; 0 disables prefetching
max_worker_processes = 14               # (change requires restart)
max_parallel_workers_per_gather = 7     # taken from max_parallel_workers
max_parallel_workers = 14               # maximum number of max_worker_processes that
wal_buffers = 16MB                      # min 32kB, -1 sets based on shared_buffers

I have seen that behavior getting only one report, so basically my question is should I change anything in my configuration to avoid this? Is there any recommendation like increasing RAM or something else based on the information I just provided?





--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/397da3b4-e7f6-4006-b386-16fe6c9f0d3do%40googlegroups.com.

Tuesday, June 9, 2020

[google-cloud-sql-discuss] Re: Add Column to CloudSQL Postgres 9.6

Hello Greg,

The Postgres in Cloud SQL should behave the same way as I could not find any public documentation that would indicate otherwise.

I hope this helps.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/026ecd9e-652c-4d17-b8b2-14f98264b3cco%40googlegroups.com.

Monday, June 8, 2020

[google-cloud-sql-discuss] Re: Can't connect over mysql-connector-python

Hello Emre, 


From your query it is appearing you are trying to connect from MySQL database located in Compute Engine instance to Cloud SQL instance. 


This document provides instructions on how to connect from Compute Engine to Cloud SQL instance. It is also possible to connect from External Applications to the Cloud SQL instance by using the proxy, by configuring access for one or more public IP addresses, busing the JDBC Socket Factory (for the Java programming language) or by using the Cloud SQL Proxy library (for the Go programming language). You can get more information on this here



On your specific query on MySQL Connector/Python you can get further information on this MySQL site where this document provides a coding example for connecting to MySQL Using Connector/Python.


If still the issue is not resolved or If you have any technical queries or think your issue is related to code, you can post at the Stack Overflow or Server Fault and a community of developers will assist you.


In case there are any technical issues or you would like to request any feature you can report it at the Public Issues by selecting the right component here


Please also note that Google Groups forum is meant for general discussion of the platform, not specific technical issues. You can find more info about Community Support Overview on Google Groups here.



On Monday, June 8, 2020 at 8:25:40 AM UTC-4, Emre AkbaÅŸ wrote:
I am very new to mysql I always use nosql db options I had a lot of issues and at the end when I am comfortable I want to let go of whole auto backup multi region config stuff to google and start to try cloud sql while everything is ok with private ip connections and such. I can connect from compute instances by mysql -h -u -p command but can't connect with mysql-connector-python 

this is what I used for connection string I am trying to find solutions without putting proxy and a lot of complication between if that's possible.

import mysql.connector
import config as cfg

def connect_db():
    mydb = mysql.connector.connect(
        host=cfg.config["sql"],
        user=cfg.config["user"],
        passwd=cfg.config["password"],
        database=cfg.config["db"],
        connection_timeout=300,
        )
    return mydb

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/386d4cee-dc0d-47b2-b37a-81d5043f68a8o%40googlegroups.com.

[google-cloud-sql-discuss] Re: Postgres share replication?

Hi,

This feature request is already forwarded to the Cloud SQL product team. You may star the ticket to vote for this feature and you would receive updates on it. However, there is no guarantee of implementation or any ETA at this time.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/5187ae41-6057-45b3-9e0c-43c72921a529o%40googlegroups.com.

Sunday, June 7, 2020

[google-cloud-sql-discuss] Can't connect over mysql-connector-python

I am very new to mysql I always use nosql db options I had a lot of issues and at the end when I am comfortable I want to let go of whole auto backup multi region config stuff to google and start to try cloud sql while everything is ok with private ip connections and such. I can connect from compute instances by mysql -h -u -p command but can't connect with mysql-connector-python 

this is what I used for connection string I am trying to find solutions without putting proxy and a lot of complication between if that's possible.

import mysql.connector
import config as cfg

def connect_db():
    mydb = mysql.connector.connect(
        host=cfg.config["sql"],
        user=cfg.config["user"],
        passwd=cfg.config["password"],
        database=cfg.config["db"],
        connection_timeout=300,
        )
    return mydb

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/c8dc2979-88b7-484b-b466-a15dd17dce95o%40googlegroups.com.

Saturday, June 6, 2020

[google-cloud-sql-discuss] Re: Postgres share replication?

Hi, any plan for supporting external replicas for Postgres?
We need to consider moving away from Cloud SQL if this feature not arrived in a foreseeable future.

On Thursday, June 4, 2020 at 9:54:12 PM UTC+7, David (Cloud Platform Support) wrote:

Hello,


You would need a replica for each instance. However, you can create multiple replicas for the same instance. For more information, please see replication options.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/e4a233b9-a009-452a-b4ad-99e969891887o%40googlegroups.com.

Friday, June 5, 2020

[google-cloud-sql-discuss] Re: Does CloudSQL MySQL block client access?

Hello Hirotake,


I am glad to know that you have got confirmation from the Google Cloud Platform Support team on your issue and I also would like to thank you for updating me which will be helpful for other users.


As you have indicated Cloud SQL (MySQL) doesn't block its clients (as of version 5.7) because the "max_connect_errors" flag is not supported, you can request for implementation of the flag to the Cloud SQL Engineering team by submitting a Feature Request by filling out the Public Issue here.


On Friday, June 5, 2020 at 12:43:48 PM UTC-4, Hirotake Shimoji wrote:
Mohammad,

We got an answer on this from Google support finally after some back and forth.
Cloud SQL MySQL doesn't block its clients (at least as of version 5.7) because the max_connect_errors flag is not supported, which you pointed out already.
I appreciate you spent you time on this.

Hirotake

On Friday, May 29, 2020 at 9:20:53 AM UTC-7, Hirotake Shimoji wrote:
Mohammad,

Thank you for the input. My coworker is working GCP support at the moment. I will post an update if I got any progress.

Hirotake

On Thursday, May 28, 2020 at 10:10:47 PM UTC-7, Mohammad I (Cloud Platform Support) wrote:

Hello Hirotake,


The error that you have indicated in your message occurs if successful connection

is not established even after the max_connect_errors successive connection requests from a host. At that point the host gets blocked to make further connections by the Server.  


I do see that you have indicated the on-premise MySQL instance and another instance built from source code (5.7.25) works as intended but not MySQL based Cloud SQL Instance. 


In this regard, I have noticed max_connect_errors flag is not supported at the moment as it is not in the supported flags list of MySQL based Cloud SQL instance. 


In addition to that I have not seen the error that you have indicated among known connection issues of MySQL based Cloud SQL. 


However after connecting to MySQL database of Cloud SQL and running the command "show variables like "max_connect_errors";", I can see the max_connect_errors value is 100 as described in the MySQL documentation. 


Based on that to me it appears that MySQL based Cloud SQL instance is not working as intended. I would suggest you to report the issue by creating a Public Issue selecting the Cloud SQL component under the Storage and Databases section of this document


In case you need to share any Project specific information please select the Private component to make sure the information is not visible to Public. After that one of the Google Cloud Support team members will assist you further.


Please also note that this forum is meant for general discussion of the platform, not specific technical issues. You can find more info about Community Support Overview on Google Groups here.


On Wednesday, May 27, 2020 at 2:58:42 PM UTC-4, Hirotake Shimoji wrote:
This is a cross post from cloudsql channel in GCP Slack, but I have not received any response yet. So, please allow me to post it here too.

Hello. I tested if Cloud SQL MySQL (version 5.7) blocks access from its clients when the number of connection related errors exceeds the value of `max_connect_errors` variable.

I used "echo | nc -v X.X.X.X 3306" from my workstation and a VM in GCP against a publicly accessible Cloud SQL MySQL instance (X.X.X.X is the server IP address).  I did this to simulate an incomplete handshake, but the instance didn't block access from the sources; even though the number of failed handshakes exceeded the max_connect_errors value.

I did the same testing against an existing on-premise MySQL instance and another instance built from source code (5.7.25).  I confirmed it blocked access on the client side from sources that reached max_connect_errors.  It gave the message, "Host 'Y.Y.Y.Y' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'".

I noticed there was no entry in performance_schema.host_cache table even after upgrading the machine type to db-n1-highmem-4, which is a requirement to enable performance_schema.
So, I am wondering if Google dropped the host blocking logic from Cloud SQL MySQL. I searched GCP docs, but couldn't find any. Does anybody have information about host blocking in Cloud SQL MySQL?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/d5eadaee-4619-4027-b37f-1a01da19bfceo%40googlegroups.com.

[google-cloud-sql-discuss] Re: can't connect sql instance

Hi Danial,

If you are receiving the same issue reported in the public issue tracker, I recommend to star the ticket for further updates on it.


--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/e4dd5242-32ea-4277-8d1f-51178b62d78fo%40googlegroups.com.

[google-cloud-sql-discuss] Re: Does CloudSQL MySQL block client access?

Mohammad,

We got an answer on this from Google support finally after some back and forth.
Cloud SQL MySQL doesn't block its clients (at least as of version 5.7) because the max_connect_errors flag is not supported, which you pointed out already.
I appreciate you spent you time on this.

Hirotake

On Friday, May 29, 2020 at 9:20:53 AM UTC-7, Hirotake Shimoji wrote:
Mohammad,

Thank you for the input. My coworker is working GCP support at the moment. I will post an update if I got any progress.

Hirotake

On Thursday, May 28, 2020 at 10:10:47 PM UTC-7, Mohammad I (Cloud Platform Support) wrote:

Hello Hirotake,


The error that you have indicated in your message occurs if successful connection

is not established even after the max_connect_errors successive connection requests from a host. At that point the host gets blocked to make further connections by the Server.  


I do see that you have indicated the on-premise MySQL instance and another instance built from source code (5.7.25) works as intended but not MySQL based Cloud SQL Instance. 


In this regard, I have noticed max_connect_errors flag is not supported at the moment as it is not in the supported flags list of MySQL based Cloud SQL instance. 


In addition to that I have not seen the error that you have indicated among known connection issues of MySQL based Cloud SQL. 


However after connecting to MySQL database of Cloud SQL and running the command "show variables like "max_connect_errors";", I can see the max_connect_errors value is 100 as described in the MySQL documentation. 


Based on that to me it appears that MySQL based Cloud SQL instance is not working as intended. I would suggest you to report the issue by creating a Public Issue selecting the Cloud SQL component under the Storage and Databases section of this document


In case you need to share any Project specific information please select the Private component to make sure the information is not visible to Public. After that one of the Google Cloud Support team members will assist you further.


Please also note that this forum is meant for general discussion of the platform, not specific technical issues. You can find more info about Community Support Overview on Google Groups here.


On Wednesday, May 27, 2020 at 2:58:42 PM UTC-4, Hirotake Shimoji wrote:
This is a cross post from cloudsql channel in GCP Slack, but I have not received any response yet. So, please allow me to post it here too.

Hello. I tested if Cloud SQL MySQL (version 5.7) blocks access from its clients when the number of connection related errors exceeds the value of `max_connect_errors` variable.

I used "echo | nc -v X.X.X.X 3306" from my workstation and a VM in GCP against a publicly accessible Cloud SQL MySQL instance (X.X.X.X is the server IP address).  I did this to simulate an incomplete handshake, but the instance didn't block access from the sources; even though the number of failed handshakes exceeded the max_connect_errors value.

I did the same testing against an existing on-premise MySQL instance and another instance built from source code (5.7.25).  I confirmed it blocked access on the client side from sources that reached max_connect_errors.  It gave the message, "Host 'Y.Y.Y.Y' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'".

I noticed there was no entry in performance_schema.host_cache table even after upgrading the machine type to db-n1-highmem-4, which is a requirement to enable performance_schema.
So, I am wondering if Google dropped the host blocking logic from Cloud SQL MySQL. I searched GCP docs, but couldn't find any. Does anybody have information about host blocking in Cloud SQL MySQL?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/f4fc04de-98a1-4363-bf3e-9a0c030e4f6do%40googlegroups.com.