Open rajanbharti opened 4 years ago
@rajanbharti Thanks for posting! We'll take a look as soon as possible.
In the mean time, there are a few ways you can help speed things along:
Please remember: never post in a public forum if you believe you've found a genuine security vulnerability. Instead, disclose it responsibly.
For help with questions about Sails, click here.
I think it is same as this issue
@rajanbharti Thanks for letting us know, what does your production datastore config currently look like?
adapter: 'sails-postgresql',
url:postgresql://<username>:<password>@/testdb?unix_socket=/cloudsql/gothic-sequence-245119:northamerica-northeast1:testdb,
charset: 'utf8mb4',
timezone: 'utc',
pool: true,
connectionLimit: 10,
@rajanbharti Haven't used PostgreSQL as my database on Google Cloud Platform before, but one thing jumping out in the code above is the unescaped "/" characters in the query string. Have you tried doing:
`?unix_socket=${encodeURIComponent('/cloudsql/gothic-sequence-245119:northamerica-northeast1:testdb')}`
I tried the solution brought up by @mikermcneil, Doesn't seem to be working.
At least what I can decode from the error logs seems like it is still attempting to connect via localhost instead of the socket.
Seems like still waiting on a fix for #6888 and #6880 ....
Hi @justinforlenza, have you tried using the workaround posted in #6888?
Node version: 12.16.0 Sails version (sails): 1.2.4 ORM hook version (sails-hook-orm): 2.1.1 Sockets hook version (sails-hook-sockets): 2.0.0 Grunt hook version (sails-hook-grunt): 4.0.0 DB adapter & version (e.g. sails-mysql@5.55.5): sails-postgresql@1.0.2
I was able to deploy with GCP app engine in flex environment. But I am anot able to access my cloudsql postgres resource. As app engine supports different notation [
/cloudsql/INSTANCE_CONNECTION_NAME
] to represent resources in app engine. https://cloud.google.com/sql/docs/mysql/connect-app-engine-flexible. If I am using that notation, in application logs. it defaults to localhost for db