Comments (6)
Thank you. I will take a look later.
But I think it's because of too many concurrent database insertions. I should fix it by making them insert serially
from cusdis.
Did you see some logs on Vercel functions log when it failed?
from cusdis.
Yes
[POST] /api/project/aa4ece8e-cc79-4c64-a92d-83bc53b09d1a/data/import
21:44:42:67
2021-04-23T13:44:47.255Z 83faf46e-922a-4eb8-bc8d-eff37a45ecf1 ERROR Unhandled Promise Rejection {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"Error: Foreign key constraint failed on the field: `comments_parentId_fkey (index)`","reason":{"errorType":"Error","errorMessage":"Foreign key constraint failed on the field: `comments_parentId_fkey (index)`","code":"P2003","clientVersion":"2.21.2","meta":{"field_name":"comments_parentId_fkey (index)"},"stack":["Error: Foreign key constraint failed on the field: `comments_parentId_fkey (index)`"," at cb (/var/task/node_modules/@prisma/client/runtime/index.js:34780:17)"," at processTicksAndRejections (internal/process/task_queues.js:93:5)"," at async /var/task/.next/server/pages/api/project/[projectId]/data/import.js:432:7"," at async Promise.all (index 2)"," at async data_service_DataService.importFromDisqus (/var/task/.next/server/pages/api/project/[projectId]/data/import.js:429:5)"," at async /var/task/.next/server/pages/api/project/[projectId]/data/import.js:504:24"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: Error: Foreign key constraint failed on the field: `comments_parentId_fkey (index)`"," at process.<anonymous> (/var/runtime/index.js:35:15)"," at process.emit (events.js:327:22)"," at processPromiseRejections (internal/process/promises.js:245:33)"," at processTicksAndRejections (internal/process/task_queues.js:94:32)"]}
from cusdis.
It seems that the parent comment that is referred to isn't created yet.
from cusdis.
It seems that the parent comment that is referred to isn't created yet.
I think so. I should make sure the parent comment upsert successfully first then upsert the children.
from cusdis.
I finally workaround this by splitting the XML into comments without parents and the rest. Then upload them separately. Thanks to Cusdis, keep going on.
from cusdis.
Related Issues (20)
- How to modify design? For example, put input form after comments
- latest commit loss of height style HOT 3
- Is possible to pre fill the email field with and email?
- Comment page rewrite
- Dashboard rewrite
- JS SDK for 2.0
- Feature requests, code highlighting
- react-cusdis not supporting react v18 HOT 3
- The official website of cusdis.com cannot be connected HOT 1
- When I import data from disqus, it shows Something went wrong
- I got an error when deploy on Railway HOT 5
- Error: text color is not loaded properly in dark mode. HOT 4
- MySQL database lose Property 'subscription' HOT 1
- How can I modify the font in Cusdis? HOT 2
- postcss v8.2.10 results in failed deployment on Vercel, latest version v8.4.27 works HOT 2
- Postgres 15. permission denied for schema public during deployment HOT 1
- How do I make a visitor's email address mandatory? HOT 1
- DOCS: Integrating Cusdis with Docusaurus websites HOT 2
- Not support nodejs18.x on vercel deployment HOT 1
- How to customize the style if I'm using JSSDK HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cusdis.