ceramicnetwork / ceramicnetwork/js-ceramic
Cannot add large schema to data model
- Dominant language
- TypeScript
- Stars
- 423
- Forks
- 126
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
HTTP request to 'http://localhost:7007/api/v0/streams' failed with status 'Internal Server Error': {"error":"request entity too large"}
**To Reproduce**
Try to load a large schema. Mine is 4MB
**Expected behavior**
A clear and concise description of what you expected to happen.
The schema should load
**Screenshots**
node ceramic-model.mjs
file:///C:/Users/richb/Projects/glazin-fhir/node_modules/@ceramicnetwork/common/lib/utils/http-utils.js:21
throw new Error(`HTTP request to '${url}' failed with status '${res.statusText}': ${text}`);
^
Error: HTTP request to 'http://localhost:7007/api/v0/streams' failed with status 'Internal Server Error': {"error":"request entity too large"}
at fetchJson (file:///C:/Users/fsdfsdf/Projects/glazin-fhir/node_modules/@ceramicnetwork/common/lib/utils/http-utils.js:21:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Function.createFromGenesis (file:///C:/Users/sdfsdf/Projects/glazin-fhir/node_modules/@ceramicnetwork/http-client/lib/document.js:42:27)
at async CeramicClient.createStreamFromGenesis (file:///C:/sdfsdf/sdfsdf/Projects/glazin-fhir/node_modules/@ceramicnetwork/http-client/lib/ceramic-http-client.js:46:24)
at async ModelManager._createDoc (file:///C:/Users/sdfsdf/Projects/glazin-fhir/node_modules/@glazed/devtools/dist/datamodel.js:148:16)
at async Promise.all (index 0)
at async ModelManager.createSchema (file:///C:/Users/sdfsdf/Projects/glazin-fhir/node_modules/@glazed/devtools/dist/datamodel.js:343:40)
at async file:///C:/Users/fsdfs/Projects/glazin-fhir/ceramic-model.mjs:26:22
**Ceramic versions**
**Machine, OS, browser information (please complete the following information):**
running daemon on linux
running client on windows 11, using the following depends:
{
"dependencies": {
"@ceramicnetwork/http-client": "^2.3.0",
"@glazed/devtools": "^0.2.0",
"dids": "^3.2.0",
"key-did-provider-ed25519": "^2.0.1",
"key-did-resolver": "^2.0.5",
"uint8arrays": "^3.0.0"
}
}
**Additional context**
Add any other context about the problem here.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure by loading the reported 4MB schema through /api/v0/streams. Start with the request path shown in @ceramicnetwork/http-client/lib/document.js and the server handling that endpoint; inspect how the request-size error is produced. Done means the large schema loads successfully, with an appropriate regression test if the relevant test location is identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100