Closed calummoore closed 5 years ago
Hey @calummoore,
I tried to connect ElephantSQL as well. I get the same error about accessing the postgres
database.
That error does not seem to be fatal for the Prisma service though. Deploying a service works and creates the correct schemata in the provided database:
Writing and reading data from that database does also seem to work.
The error message you posted further down are from our GraphQL query validation library. And it seems the server is receiving an invalid GraphQL query. Can you try writing queries through the playground? That should validate the GraphQL statements and help pinpoint the issue.
Thanks for the update. It won't let me deploy though? When I access the endpoint I get a GraphQL playground so it appears to be running.
prisma.yml
endpoint: https://weekly-prisma-latest-zqsp.zeplosvc.com
datamodel: datamodel.prisma
datamodel.prisma
type User {
id: ID! @unique
name: String!
}
I get the following error on prisma deploy
environment TypeError: Cannot read property 'serverInfo' of undefined
environment at Cluster.<anonymous> (/Users/calummoore/.nvm/versions/node/v10.13.0/lib/node_modules/prisma/node_modules/prisma-yml/src/Cluster.ts:227:19)
environment at step (/Users/calummoore/.nvm/versions/node/v10.13.0/lib/node_modules/prisma/node_modules/prisma-yml/dist/Cluster.js:32:23)
environment at Object.next (/Users/calummoore/.nvm/versions/node/v10.13.0/lib/node_modules/prisma/node_modules/prisma-yml/dist/Cluster.js:13:53)
environment at fulfilled (/Users/calummoore/.nvm/versions/node/v10.13.0/lib/node_modules/prisma/node_modules/prisma-yml/dist/Cluster.js:4:58)
environment at process._tickCallback (internal/process/next_tick.js:68:7) +0ms
Error: Could not connect to server at https://weekly-prisma-latest-zqsp.zeplo.xyz. Please check if your server is running.
at Deploy.<anonymous> (/Users/calummoore/.nvm/versions/node/v10.13.0/lib/node_modules/prisma/node_modules/prisma-cli-core/src/commands/deploy/deploy.ts:128:13)
at step (/Users/calummoore/.nvm/versions/node/v10.13.0/lib/node_modules/prisma/node_modules/prisma-cli-core/dist/commands/deploy/deploy.js:45:23)
at Object.next (/Users/calummoore/.nvm/versions/node/v10.13.0/lib/node_modules/prisma/node_modules/prisma-cli-core/dist/commands/deploy/deploy.js:26:53)
at fulfilled (/Users/calummoore/.nvm/versions/node/v10.13.0/lib/node_modules/prisma/node_modules/prisma-cli-core/dist/commands/deploy/deploy.js:17:58)
at process._tickCallback (internal/process/next_tick.js:68:7)
util timed out +0ms
Hi @calummoore
I am also unable to reproduce this. I have successfully deployed the datamodel and also written a user in the database.
I think you should enable connectionLimits in the config as elephantSQL provides limited number of connections:
version: '3'
services:
prisma:
image: prismagraphql/prisma:1.29.2
restart: always
ports:
- "4466:4466"
environment:
PRISMA_CONFIG: |
port: 4466
# uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
# managementApiSecret: my-secret
databases:
default:
connector: postgres
host: isilo.db.elephantsql.com
database: <redacted>
user: <redacted>
password:<redacted>
rawAccess: true
port: '5432'
connectionLimit: 4
migrations: true
ssl: true
Closing this now. Feel free to open a new issue if you are still experiencing this
Describe the bug Deploy fails, it attempts to connecto to
postgres
database, even though I have specified an alternative database nameorqidund
.To Reproduce Attempt to deploy
prisma deploy
and I get the following error message:Docker config is:
Expected behavior Deploys to Prisma server
Versions (please complete the following information):
Postgres
1.28
prisma
CLI:prisma/1.28.3 (darwin-x64) node-v10.13.0
OS X Mojave
Additional context I get the following log output: