Large mutation raises OOM exception and server crash.
See original GitHub issueI faced interesting result wile posting large mutation.
mutation contains object
{
10 keys
key: [~list of 200 objects]
}
Actual size is not large
app.use(bodyParser.urlencoded({extended: true, limit: '2mb'}))
app.use(bodyParser.json({limit: '2mb'}))
GraphQL produces errors, something like this
Field "Batch" is not defined by type OrderLineType at value[0].[object Object]Variable "$order" got invalid value [SENT OBJECT]
But, as i have list, there is 200+ errors. So, for every single error, grapqhl provides full copy of posted object. Error buffer gets to large and here is result
<--- Last few GCs --->
[1100:000001DBF36A3F60] 140557 ms: Mark-sweep 8188.8 (8323.5) -> 8188.8 (8323.5) MB, 81.6 / 0.0 ms allocation failure GC in old space requested
[1100:000001DBF36A3F60] 140651 ms: Mark-sweep 8188.8 (8323.5) -> 8188.8 (8320.5) MB, 94.5 / 0.0 ms last resort GC in old space requested
[1100:000001DBF36A3F60] 140740 ms: Mark-sweep 8188.8 (8320.5) -> 8188.8 (8320.5) MB, 89.2 / 0.0 ms last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 000001222EC25879 <JSObject>
1: DoJoin(aka DoJoin) [native array.js:~94] [pc=000000572D3B0E46](this=00000307B0A822D1 <undefined>,o=000003A4E9EF66D9 <JSArray[268]>,p=268,D=00000307B0A82371 <true>,z=000003E3FA7A5259 <String[2]: , >,y=00000307B0A823E1 <false>)
2: Join(aka Join) [native array.js:~119] [pc=000000572D3B1ABE](this=00000307B0A822D1 <undefined>,o=000003A4E9EF66D9 <JSArray[268]>,p=268,z=000003E3FA7A5259 <St...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node_module_register
2: v8::internal::FatalProcessOutOfMemory
3: v8::internal::FatalProcessOutOfMemory
4: v8::internal::Factory::NewRawTwoByteString
5: v8::internal::AsmJsScanner::IsNumberStart
6: 000000572D2043C1
Increasing --max-old-space-size=8192, dose not help. Node still crashes.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
The 4 general reasons for OutOfMemoryError errors and ... - IBM
If the heapdump was generated from an OOM error, I can't tell if it was from a single large allocation request failure. Here...
Read more >3.2 Understand the OutOfMemoryError Exception
This exception is typically thrown because the amount of live data barely fits into the Java heap having little free space for new...
Read more >How to Fix java.lang.OutOfMemoryError in Minecraft
When you're joining a Minecraft server or your singleplayer world, you might encounter a set of errors. Let's find out how to fix...
Read more >Managing an OutOfMemory Exception Caused by Thread ...
Debugging Java Virtual Machine (JVM) crashes is a common ... running on the server, process A could be consuming a large thread count...
Read more >Stardog Platform Release Notes | Stardog Documentation 7.8.2
VG query with Service Join might throw CyclicMetadataException ... Stardog server crashes silently during startup when open file limit is exceeded ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@goldcaddy77 I did, but nobody cares. Until somebody starts crashing servers, I don’t think there will be fix 🗡
@abernix Thank you, just tested, problem is in graphql-js.