服务器配置 16G 内存, 500G 硬盘,分了 8G 给 ES 用。网站搭配 flask+nginx+mongodb+elasticsearch,最近 google webmaster 里老出现 500 和 502 错误,见前一个帖子 http://v2ex.com/t/247625#reply9 ,现在找到原因是 ES 全文搜索有错误,我在 ES 日志里看到不少这种搜索错误,请问是什么原因造成的?内存还是小吗?
[2016-01-19 23:42:38,283][DEBUG][action.search.type ] [Razorback] [exta][2], node[7B-RkEI5Rq2uLL2yqg3CPA], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@5a7adcd4] lastShard [true]
org.elasticsearch.search.SearchParseException: [exta][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query": {"query_string": {"query": "gymnast torture\"}}}]]
at org.elasticsearch.search.SearchService.parseSource(SearchService.java:721)
at org.elasticsearch.search.SearchService.createContext(SearchService.java:557)
at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:529)
at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:291)
at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231)
at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228)
at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.index.query.QueryParsingException: [exta] Failed to parse query [gymnast torture]
at org.elasticsearch.index.query.QueryStringQueryParser.parse(QueryStringQueryParser.java:250)
at org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:302)
at org.elasticsearch.index.query.IndexQueryParserService.innerParse(IndexQueryParserService.java:382)
at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:281)
at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:276)
at org.elasticsearch.search.query.QueryParseElement.parse(QueryParseElement.java:33)
at org.elasticsearch.search.SearchService.parseSource(SearchService.java:705)
... 9 more
Caused by: org.apache.lucene.queryparser.classic.ParseException: Cannot parse 'gymnast torture\': Lexical error at line 1, column 17. Encountered: <EOF> after : ""
at org.apache.lucene.queryparser.classic.QueryParserBase.parse(QueryParserBase.java:137)
at org.apache.lucene.queryparser.classic.MapperQueryParser.parse(MapperQueryParser.java:887)
at org.elasticsearch.index.query.QueryStringQueryParser.parse(QueryStringQueryParser.java:233)
... 15 more
Caused by: org.apache.lucene.queryparser.classic.TokenMgrError: Lexical error at line 1, column 17. Encountered: <EOF> after : ""
at org.apache.lucene.queryparser.classic.QueryParserTokenManager.getNextToken(QueryParserTokenManager.java:1133)
at org.apache.lucene.queryparser.classic.QueryParser.jj_scan_token(QueryParser.java:601)
at org.apache.lucene.queryparser.classic.QueryParser.jj_3R_2(QueryParser.java:484)
at org.apache.lucene.queryparser.classic.QueryParser.jj_3_1(QueryParser.java:491)
at org.apache.lucene.queryparser.classic.QueryParser.jj_2_1(QueryParser.java:477)
at org.apache.lucene.queryparser.classic.QueryParser.Clause(QueryParser.java:228)
at org.apache.lucene.queryparser.classic.QueryParser.Query(QueryParser.java:214)
at org.apache.lucene.queryparser.classic.QueryParser.TopLevelQuery(QueryParser.java:172)
at org.apache.lucene.queryparser.classic.QueryParserBase.parse(QueryParserBase.java:127)
... 17 more
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.