错误日志栈主要是隐绝这个在跳,那么分析这个错误日志栈。translog文件记载出错,实际索引的offset和translog的offset不一样了,导致索引健康检查错误。首先最差最差的手段无非是重建索引,但还是希望有别的补救措施,积累一个排错经验。
translog文件是用来记载索引写入offset等信息,我的误 *** 作是删除node.lock后并重启。原因我推断是在失去锁的控制后,索引并没有在实际写入数据,但是translog文件却一直没有受到限制继续被一直写入。lucene系的产品都是数据先临时登录到translog在merge到索引这样一个过程灶粗姿。那么我们可以付出这样一个代价:放弃已经写到translog的数据,优先保护索引。也就是删除出错的translog,但这个过程不能直接用rm,需要使用lucene提供的translog工具。
1、Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
<--- Last few GCs --->
[3628:0000020F92556310] 101267813 ms: Mark-sweep 2045.8 (2063.6) ->2045.7 (2061.1) MB, 823.6 / 0.0 ms (+ 217.9 ms in 2 steps since start of marking, biggest step 217.9 ms, walltime since start of marking 1052 ms) (average mu = 0.052, current mu = 0.011)
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x016990671ba1 <JSObject>
1: parseMessage [00000302F1DB3371] [C:\Platform\node\service\node_modules\pg\lib\connection.js:~377] [pc=0000028DA566DDB0](this=0x03d27f47c261 <Connection map = 0000012A6A060F51>,0x03e134ba35c9 <Uint8Array map =
0000012A6A065321>)
2: /* anonymous */ [0000020ACD5EAF31] [C:\Platform\node\service\node_modules\pg\lib\connection.js:~119] [pc=0000028DA56...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF78BAC094F napi_wrap+124431
2: 00007FF78BA62696 v8::base::CPU::has_sse+34502
3: 00007FF78BA63356 v8::base::CPU::has_sse+37766
4: 00007FF78C266F4E v8::Isolate::ReportExternalAllocationLimitReached+94
5: 00007FF78C24EF91 v8::SharedArrayBuffer::Externalize+833
6: 00007FF78C11C85C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1436
7: 00007FF78C127C00 v8::internal::Heap::ProtectUnprotectedMemoryChunks+1312
8: 00007FF78C124734 v8::internal::Heap::PageFlagsAreConsistent+3204
9: 00007FF78C119FC3 v8::internal::Heap::CollectGarbage+1283
10: 00007FF78C118794 v8::internal::Heap::AddRetainedMap+2356
11: 00007FF78C140623 v8::internal::Factory::NewRawOneByteString+83
12: 00007FF78C1434D2 v8::internal::Factory::NewStringFromUtf8+130
13: 00007FF78C26386A v8::String::NewFromUtf8+298
14: 00007FF78B9D76EF node::tracing::TraceEventHelper::SetAgent+40751
15: 00007FF78BA79BFD v8::internal::Malloced::operator delete+1661
16: 00007FF78C61341C v8::internal::SetupIsolateDelegate::SetupHeap+4562817: 0000028DA566DDB0
2、<--- JS stacktrace --->
Cannot get stack trace in GC.
FATAL ERROR: MarkCompactCollector: semi-space copy, fallback in old gen Allocation failed - JavaScript heap out of memory
这个问题是node内存泄漏造成的。因为node是单线程的,所有的访问走的一个线程,如果执行完一个,占用内存增加,但是没有释放的话,就造成内存泄漏,内存泄漏其实就是存储泄漏,而造成的原因就是内存分配超过了v8内存的限制数量,而且进程所占用的内存,并没有慢慢释放回来,
解决办法:node --max-old-space-size=6096 analysis.js
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)