This repository was archived by the owner on Sep 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
This repository was archived by the owner on Sep 2, 2024. It is now read-only.
Memory leak? #5
Copy link
Copy link
Open
Description
I started the server:
NODE_ENV=production node node_modules/xclap/bin/clap.js server
...
Hapi.js server running at http://woody:3000
and a client (8 cores in a multiprocessing.Pool, each with an eventlet pool of size 20):
./runspec.py -f config-ssr.json --nCoresToUse 0
Using seed None
[27-04-2018 14:41:57] Parsing arguments.
Input options config files: config-ssr.json
runMode requests
Starting Node-DC-SSR-electrode v0.8.0 in SSR-electrode Mode
[27-04-2018 14:41:57] Building list of Urls done.
[27-04-2018 14:41:57] Creating temporary log file
[27-04-2018 14:41:57] Starting request based run.
[27-04-2018 14:41:57] Requests:[500], Concurrency:[20]
Creating MP pool
Submitting 8 jobs to pool
Worker: args {'nSteadyState': 62, 'nRampDown': 12, 'nRampUp': 12, 'concurrency': 20, 'logFile': 'RTdata-0'}
Creating eventlet pool
Worker: args {'nSteadyState': 62, 'nRampDown': 12, 'nRampUp': 12, 'concurrency': 20, 'logFile': 'RTdata-1'}
Creating eventlet pool
Worker: args {'nSteadyState': 62, 'nRampDown': 12, 'nRampUp': 12, 'concurrency': 20, 'logFile': 'RTdata-2'}
Creating eventlet pool
Worker: args {'nSteadyState': 62, 'nRampDown': 12, 'nRampUp': 12, 'concurrency': 20, 'logFile': 'RTdata-3'}
Creating eventlet pool
Worker: args {'nSteadyState': 62, 'nRampDown': 12, 'nRampUp': 12, 'concurrency': 20, 'logFile': 'RTdata-4'}
Creating eventlet pool
Worker: args {'nSteadyState': 62, 'nRampDown': 12, 'nRampUp': 12, 'concurrency': 20, 'logFile': 'RTdata-5'}
Creating eventlet pool
Worker: args {'nSteadyState': 62, 'nRampDown': 12, 'nRampUp': 12, 'concurrency': 20, 'logFile': 'RTdata-6'}
Creating eventlet pool
Worker: args {'nSteadyState': 62, 'nRampDown': 12, 'nRampUp': 12, 'concurrency': 20, 'logFile': 'RTdata-7'}
The client has a total of 8 cores * 20 green threads / core == 160 requests active concurrently.
Although the server processes requests slowly, since the client is not unbridled the server's queues should not grow unbounded.
Nevertheless, the server eventually said:
<--- Last few GCs --->
[2846:0x3d43a10] 1410213 ms: Mark-sweep 1413.1 (1477.4) -> 1413.1 (1458.9) MB, 687.4 / 0.0 ms (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 687 ms) last resort GC in old space requested
[2846:0x3d43a10] 1410899 ms: Mark-sweep 1413.1 (1458.9) -> 1413.1 (1458.9) MB, 686.0 / 0.0 ms last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x300d5325ee1 <JSObject>
1: instantiateChildren [/home/jamie/Desktop/node-profiling/benchmarks/node-dc/Node-DC-SSR/Node-DC-SSR-electrode/.prod/modules/react-dom/lib/ReactChildReconciler.js:~46] [pc=0x3bbabdfd9dcc](this=0x20755c4fbd1 <Object map = 0x21986a941f49>,nestedChildNodes=0x36cc21773381 <JSArray[20]>)
2: arguments adaptor frame: 3->1
3: mountChildren [/home/jamie/Desktop/node-profiling/benchmarks/node-...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [node]
2: 0x121a7ac [node]
3: v8::Utils::ReportOOMFailure(char const*, bool) [node]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
5: v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [node]
6: v8::internal::Runtime_AllocateInTargetSpace(int, v8::internal::Object**, v8::internal::Isolate*) [node]
7: 0x3bbabde8463d
Aborted (core dumped)
[14:45:57] >Failed Execute electrode/app-server as function (23.52 min)
[14:45:57] Done Process electrode/server serial array ["app-server"] (23.52 min)
Execution Failed - Errors:
1 shell cmd 'node lib/server/index.js' exit code 134
I interpret this as a memory leak in the server.
Metadata
Metadata
Assignees
Labels
No labels