当我 运行 查询单行时解析服务器崩溃

Parse Server crashing when I running a query on a single row

我有一个名为 Artist 的 table 并且我 运行 使用 or 运算符进行搜索 orQuery = Parse.Query.or(query1, query2, query3, query4, query5, query6, query7, query8, query9, query10);

但是服务器崩溃,当我在 table 中添加另一行时,搜索查询工作正常..

错误信息如下:

`2019-11-16T18:47:27.973552+00:00 heroku[web.1]: State changed from up to crashed
2019-11-16T18:47:28.046944+00:00 heroku[web.1]: State changed from crashed to starting
2019-11-16T18:47:27.960077+00:00 heroku[web.1]: Process exited with status 134
2019-11-16T18:47:27.856741+00:00 app[web.1]: 
2019-11-16T18:47:27.856755+00:00 app[web.1]: <--- Last few GCs --->
2019-11-16T18:47:27.856757+00:00 app[web.1]: 
2019-11-16T18:47:27.856759+00:00 app[web.1]: [4:0x3732630]   447289 ms: Mark-sweep 243.9 (257.8) -> 243.4 (257.8) MB, 330.2 / 0.0 ms  (average mu = 0.149, current mu = 0.058) allocation failure scavenge might not succeed
2019-11-16T18:47:27.856760+00:00 app[web.1]: [4:0x3732630]   447664 ms: Mark-sweep 244.1 (257.8) -> 243.5 (257.6) MB, 367.5 / 0.0 ms  (average mu = 0.086, current mu = 0.021) allocation failure scavenge might not succeed
2019-11-16T18:47:27.856762+00:00 app[web.1]: [4:0x3732630]   447686 ms: Scavenge 244.3 (257.6) -> 243.8 (257.8) MB, 1.7 / 0.0 ms  (average mu = 0.086, current mu = 0.021) allocation failure 
2019-11-16T18:47:27.856793+00:00 app[web.1]: 
2019-11-16T18:47:27.858836+00:00 app[web.1]: 
2019-11-16T18:47:27.858839+00:00 app[web.1]: <--- JS stacktrace --->
2019-11-16T18:47:27.858840+00:00 app[web.1]: 
2019-11-16T18:47:27.858842+00:00 app[web.1]: ==== JS stack trace =========================================
2019-11-16T18:47:27.858844+00:00 app[web.1]: 
2019-11-16T18:47:27.858845+00:00 app[web.1]:     0: ExitFrame [pc: 0x13725d9]
2019-11-16T18:47:27.858847+00:00 app[web.1]: Security context: 0x0c8fcd2808a1 <JSObject>
2019-11-16T18:47:27.858849+00:00 app[web.1]:     1: mongoObjectToParseObject(aka mongoObjectToParseObject) [0xa22d76fc3b1] [/app/node_modules/parse-server/lib/Adapters/Storage/Mongo/MongoTransform.js:~1113] [pc=0x18308b605d68](this=0x05582c3c04a9 <undefined>,0x1d950f06d4b9 <String[#11]: SearchTerms>,0x08f440575ef1 <Object map = 0x29ebf7841881>,0x059981459f61 <Object map = 0x29ebf78587b1>)
2019-11-16T18:47:27.858851+00:00 app[web.1]:     2: /* anonymou...
2019-11-16T18:47:27.858852+00:00 app[web.1]: 
2019-11-16T18:47:27.858879+00:00 app[web.1]: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
2019-11-16T18:47:27.859052+00:00 app[web.1]: 
2019-11-16T18:47:27.870306+00:00 app[web.1]: Writing Node.js report to file: report.20191116.184727.4.0.001.json
2019-11-16T18:47:27.870347+00:00 app[web.1]: Node.js report completed
2019-11-16T18:47:27.870926+00:00 app[web.1]:  1: 0x9d8da0 node::Abort() [node]
2019-11-16T18:47:27.871469+00:00 app[web.1]:  2: 0x9d9f56 node::OnFatalError(char const*, char const*) [node]
2019-11-16T18:47:27.872050+00:00 app[web.1]:  3: 0xb37dbe v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
2019-11-16T18:47:27.872619+00:00 app[web.1]:  4: 0xb38139 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
2019-11-16T18:47:27.873259+00:00 app[web.1]:  5: 0xce34f5  [node]
2019-11-16T18:47:27.873899+00:00 app[web.1]:  6: 0xce3b86 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node]
2019-11-16T18:47:27.874546+00:00 app[web.1]:  7: 0xcefa1a v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
2019-11-16T18:47:27.875187+00:00 app[web.1]:  8: 0xcf0925 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
2019-11-16T18:47:27.875837+00:00 app[web.1]:  9: 0xcf3338 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [node]
2019-11-16T18:47:27.876468+00:00 app[web.1]: 10: 0xcb9c67 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType) [node]
2019-11-16T18:47:27.877218+00:00 app[web.1]: 11: 0xfefb9b v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
2019-11-16T18:47:27.877979+00:00 app[web.1]: 12: 0x13725d9  [node]`

这是 的骗局。您可以尝试使用 NODE_OPTIONS="--max-old-space-size=16384" npm start.

增加节点进程的内存量

我在 Procfile 中尝试过,现在可以使用了

web: node --max-old-space-size=4096 parse/server.js