P
Prisma•2w ago
ididit

Migration just stalls and hangs.

sometimes, when i perform prisma migrate to either create a new migration or run migration, it just hangs. what are some of the reasons for that happening? we haven't gone production yet but this is super scary. it happens to me from a fresh database after like 2 or 3 days later. we do have a custom BM25 index. its scary because the only way to get migration to work again is if i do a complete drop database and start over.
7 Replies
Prisma AI Help
Prisma AI Help•2w ago
You chose to debug with a human. They'll tinker with your query soon. If you get curious meanwhile, hop into #ask-ai for a quick spin!
Nurul
Nurul•2w ago
Hey 👋 Does this happen on latest prisma version? Does the process still hang even if you kill the process with Cmd+C and run prisma migrate again?
ididit
ididitOP•2w ago
Yes to both
Nurul
Nurul•7d ago
Hmm! We would need a minimal reproduction to figure our what's going on. Does this happen even if you remove the BM25 index?
ididit
ididitOP•6d ago
@Nurul (Prisma) yes it still hangs even after i have removed the index from schema: // @@index([id, name, description], map: "product_bm25_idx") as well as after i dropped the BM25 index manually from database table. attached screenshot is how it hangs.
No description
ididit
ididitOP•6d ago
and this is the migration file for adding bm25 index:
-- CreateIndex
CREATE EXTENSION IF NOT EXISTS postgis;
-- prisma-ignore-index
CREATE INDEX product_bm25_idx ON "Product"
USING bm25 (id, name, description)
WITH (
key_field='id',
text_fields='{
"name": {"fast": true},
"description": {"fast": true}
}'
);
-- CreateIndex
CREATE EXTENSION IF NOT EXISTS postgis;
-- prisma-ignore-index
CREATE INDEX product_bm25_idx ON "Product"
USING bm25 (id, name, description)
WITH (
key_field='id',
text_fields='{
"name": {"fast": true},
"description": {"fast": true}
}'
);
Nurul
Nurul•6d ago
Strange! Are you on the latest prisma version? Do you mind creating a GitHub Issue so that our ORM team can have a look and provide insights? https://github.com/prisma/prisma/issues/

Did you find this page helpful?