Greetings, this is Magma here. I am having an iss...
# prisma1-community
m
Greetings, this is Magma here. I am having an issue with
prisma-deploy
where it is taking too much time to
deploy changes
. Can anyone please help me out ?
r
Hey @MagmaStorm 👋 Could you elaborate on your setup about what you’re using? Also, is it just taking time to deploy successfully or are you facing any issues?
👍 1
m
Hell @Ryan I am using Ubuntu 20.04 with latest Docker and Docker-compose with prisma 1.34. Yes it deploys successfully but it takes up too much time for even for simpler tasks. It took 200 seconds to deploy the default generated code. It would be very helpful if you could help me out 🙂
r
Currently you’re running
prisma deploy
locally and it’s taking 200 seconds?
🔥 1
m
Yes. Also Sorry I replied late.
Even for smaller schema changes it takes roughly 200 seconds.
This is the message I got: Deploying service
default
to stage
default
to server
local
45.6s Changes: User (Type) ~ Updated field
email
. It became unique.   Applying changes 150.2s Your Prisma endpoint is live: HTTP: http://localhost:4466 WS: ws://localhost:4466 You can view & edit your data here: Prisma Admin: http://localhost:4466/_admin Here Is my Docker-compose.yml version: '3' services: 1. prisma: 2. image: prismagraphql/prisma:1.34 3. restart: always 4. ports: 5. - "4466:4466" 6. environment: 7. PRISMA_CONFIG: | 8. port: 4466 9. # uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security 10. # managementApiSecret: my-secret 11. databases: 12. default: 13. connector: postgres 14. host: xxx.eu-west-1.compute.amazonaws.com 15. database: xxx 16. schema: public 17. user: xxx 18. password: xxx 19. ssl: true 20. rawAccess: true 21. port: '5432' 22. migrations: true
r
Is your database in a different region from where you are deploying? I don’t think it should take that long to deploy.
👍 1
m
Yes, It is in a different location. But ya, I have also checked different websites and all suggest that this should not take that long to have effect and that is the reason I am confused on how to solve this problem. Anyways, thanks for the response.
r
I tried reproducing by keeping my DB in a different location to my local server and it’s doesn’t take more than 20 seconds. Although I used just a couple of models for this. Could you try it on a different server and check if the issue still persists?
👍 1
m
Okay, will do that and reply with the results. By the way, I really appreciate you taking your time off of your day and replying to me 🙂.
🙌 1
Hello good sir! I tried changing the locations and it is not improving the speeds. I am still getting huge speeds. I might just look into prisma 2 but I am doing a course which is in prisma 1 + graphql. So might have to wait this long deployment time till that course is done. Anyways, thanks for the help. I could find very few resources on websites regarding this issue, but did find that many people were having similar issue on the course forums.
Creating stage default for service default ✔️ Deploying service
default
to stage
default
to server
local
27.2s Changes: User (Type) + Created type
User
+ Created field
id
of type
ID!
+ Created field
name
of type
String!
+ Created field
email
of type
String!
+ Created field
posts
of type
[Post!]!
Post (Type) + Created type
Post
+ Created field
id
of type
ID!
+ Created field
title
of type
String!
+ Created field
body
of type
String!
+ Created field
published
of type
Boolean!
+ Created field
author
of type
User!
PostToUser (Relation) + Created an inline relation between
Post
and
User
in the column
author
of table
Post
Applying changes 216.4s Your Prisma endpoint is live: HTTP: http://localhost:4466 WS: ws://localhost:4466 You can view & edit your data here: Prisma Admin: http://localhost:4466/_admin --- This is the latest I got after changing the location of the server.