I have created a google cloud function in google cloud which will connect to my postgresql instance created in Google cloud.
I am using 'pg' node module.
I have create a private IP for this.
I am getting following error:
Error: Connection terminated due to connection timeout at Timeout.connectionTimeoutHandle.setTimeout (/workspace/node_modules/pg/lib/client.js:106:28) at ontimeout (timers.js:436:11) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10)
when trying to query the database in google cloud.
This is my configuration which I am using in google cloud function.
{ "host": "", "user": "", "pw": "", "db": "<database_name>", "port": "5432", "table": "<table_name", "max": 100, "idleTimeoutMillis": 30000, "connectionTimeoutMillis": 30000 }
Please help me with this