contentful.js
contentful.js copied to clipboard
Memory Leak: `10.4.2` - `Uncaught signal: 2, pid=42, tid=42, fault_addr=0.`
Hi good evening,
Sorry have not the time to confirm which of the two or if because using in tandem, but either the contentful package or is the rich text renderer or in tandem creates a memory leak. I found a blog post about contentful memory leaks when searching the logging errors, and the memory leak coincides precisely with the latest version bump and then when rolled back to previous version no more memory leaks. So am confident culprit is one of these libraries or both.
Expected Behavior
No memory leaks
Actual Behavior
Memory Leaks
Possible Solution
Steps to Reproduce
- install
contentful 10.4.2
and@contentful/rich-text-react-renderer 15.17.1
into next.js service"next": "^13.4.13"
node 18 on google app engine - deploy on google app engine
- witness memory leaks "Uncaught signal: 2, pid=42, tid=42, fault_addr=0." in the logging
Context
Memory leaks have lead to unpredictable behavior for users, to google app engine over provisioning/spinning up more and more instances than normal.
Environment
-
Language Version: node 18 standard (google app engine)
runtime: nodejs18
-
Package Manager Version:
9.6.7
- Browser Version:
- Operating System: Google App Engine Standard
- Package Version:
-
Which API are you using?:
import { createClient, ContentfulClientApi } from "contentful";
Soon as rolled back to
"contentful": "^10.4.0",
"@contentful/rich-text-react-renderer": "^15.17.0",
Memory leaks ceased.