Having some pretty huge difficulties trying to mig...
# orm-help
s
Having some pretty huge difficulties trying to migrate from Graphcool to Prisma. For a few weeks now I’ve been trying to get a new setup on Prisma going with the same schema as Graphcool, and a Yoga server in front of it. I now have a node/React app that talks to Yoga on a Heroku instance, which talks to a Prisma server also on Heroku. Even under a tiny amount of traffic, after a short while, the Prisma server ends up with 30000ms runtime executions that get timed out, and then H12 errors across the board. This is without any load other than just me running a quick test of my existing code, which uses server side subscriptions and google cloud functions. I’m at a loss as to what to do here because the Prisma instance is something of a mystery black box. Has anyone seen similar and able to point me in the right direction of how to work out what’s going wrong?
👀 1
m
Where is the Prisma server running in this case?
👍 2
s
@marcus it’s running as a 2x dyno Heroku instance
I think that fundamentally I need to deploy this on something with more resources than a standard heroku container, but that seems strange given that this isn’t under any load.
And for clarity - I mean that I have two separate heroku instances.
d
Does this happen with continuous testing as well? When unused for a while, heroku dynos shut down and the first request that wakes them is relatively slower.
s
No that’s when it’s up and running. It processes a few requests, then the H12s start, then eventually all requests H12.
@divyendu ^
d
Thanks, can you tell me more about your stack? What libraries are you using in front of Prisma? If possible, a small repro repository? Maybe I am able to repro this on heroku I host. Are you using the free heroku plan or paid one?
s
The stack is create-react-app on the front end, Apollo, then Graphcool. In Graphcool I have a couple of server side subscriptions for new records that call a google cloud function via a webhook. Those webhooks then write back to the API. In the new stack that I’ve been desperately trying to get live, it’s the same but I’ve swapped Graphcool out for Yoga and Prisma. Both Yoga and Prisma I have on paid Heroku instances when I’m testing this.
m
What are H12 errors? :-)
s
Ah right, they’re the standard error Heroku where it kills a process after it executes for too long. Heroku has a maximum 30s execution time. But these are just reads and writes, not complex queries.
I’m going to keep trying this weekend, but not feeling hopeful. At the moment I’m going to pause on this path and move some of the larger pieces of the project over to Google Cloud Platform and then make Graphcool resolvers that call a function that queries data from Firestore. 😕
d
My recommendation would be to create a small project with your datamodel and share with us some actual queries you are running. We might be able to replicate this. Generally, we have a lot of people using Prisma + Heroku without issues. I would also recommend moving this to
<mailto:support@prisma.io|support@prisma.io>
. Happy to help 🙂