[英]Elasticsearch OutOfMemoryError Java heap space while indexing a document
我正在嘗試將3個文檔編入索引。 我已經能夠成功索引前兩個索引,但是在索引第三個索引時,我收到與終端中堆空間有關的錯誤。 我嘗試將jvm.options文件中的堆大小增加到3g,因為我只有4GB的RAM,但仍然沒有幫助 。 這是我的文檔的樣子,並且以前索引的文檔僅在坐標值發生變化的情況下才與之相似:
curl -XPUT 'localhost:9200/test/test1/2?pretty&pretty' -H 'Content-Type: application/json' -d'
{
"createdAt": "2017-03-30T12:36:28.061Z",
"updatedAt": "2017-03-30T12:36:28.061Z",
"id": "g5G4c",
"user": "0000-0002-1194-2058",
"metadata": {
"raw": {
"author": [
{
"affiliation": [],
"name": "Markus Konkol",
"orcid": "0000-0002-4898-0314"
}
],
"community": "o2r",
"date": "30 November 2016",
"depends": [
{
"category": "CRAN Top100",
"identifier": "shiny",
"packageSystem": "https://cloud.r-project.org/",
"version": null
},
{
"category": "none",
"identifier": "likert",
"packageSystem": "https://cloud.r-project.org/",
"version": null
}
],
"description": null,
"ercIdentifier": "g5G4c",
"file": {
"filename": "main.Rmd",
"filepath": "g5G4c/data/main.Rmd",
"mimetype": "text/markdown"
},
"generatedBy": "o2r-meta metaextract.py",
"inputfiles": [
"/tmp/o2r/compendium/g5G4c/data/quest.csv"
],
"interaction": {
"interactive": true
},
"keywords": [],
"license": null,
"output": {
"html_document": {
"number_sections": true
}
},
"paperLanguage": [
"en"
],
"paperSource": "main.Rmd",
"publicationDate": null,
"r_comment": [
{
"feature": "comment",
"line": 29,
"text": "sum of "
},
{
"feature": "comment",
"line": 32,
"text": "sum of "
},
{
"feature": "comment",
"line": 37,
"text": "sum of "
},
{
"feature": "comment",
"line": 81,
"text": "Participants"
},
{
"feature": "comment",
"line": 84,
"text": "What are you doing in the context of scientific publications"
},
{
"feature": "comment",
"line": 86,
"text": "sum of "
},
{
"feature": "comment",
"line": 89,
"text": "sum of "
},
{
"feature": "comment",
"line": 92,
"text": "sum of "
},
{
"feature": "comment",
"line": 118,
"text": "print"
},
{
"feature": "comment",
"line": 119,
"text": "print"
},
{
"feature": "comment",
"line": 120,
"text": "print"
},
{
"feature": "comment",
"line": 123,
"text": "What are your research fields"
},
{
"feature": "comment",
"line": 192,
"text": "Please tell us your age"
},
{
"feature": "comment",
"line": 198,
"text": "Please tell us your gender"
},
{
"feature": "comment",
"line": 203,
"text": "Reproducible research"
},
{
"feature": "comment",
"line": 237,
"text": "Interaction"
},
{
"feature": "comment",
"line": 239,
"text": "Relating to your last five publications"
},
{
"feature": "comment",
"line": 262,
"text": "While reading a scientific publication that is related to my own research work"
},
{
"feature": "comment",
"line": 273,
"text": "It would be useful for my research work"
},
{
"feature": "comment",
"line": 283,
"text": "For my research work I would like to search for other scientific publications on the web by using"
}
],
"r_input": [
{
"feature": "data input",
"line": 8,
"text": "quest.csv"
}
],
"r_output": [
{
"feature": "result",
"line": 67,
"text": "plot"
},
{
"feature": "result",
"line": 69,
"text": "plot"
},
{
"feature": "result",
"line": 76,
"text": "plot"
},
{
"feature": "result",
"line": 77,
"text": "print"
},
{
"feature": "result",
"line": 112,
"text": "plot"
},
{
"feature": "result",
"line": 118,
"text": "print"
},
{
"feature": "result",
"line": 119,
"text": "print"
},
{
"feature": "result",
"line": 120,
"text": "print"
},
{
"feature": "result",
"line": 179,
"text": "plot"
},
{
"feature": "result",
"line": 182,
"text": "print"
},
{
"feature": "result",
"line": 183,
"text": "print"
},
{
"feature": "result",
"line": 184,
"text": "print"
}
],
"recordDateCreated": "2017-03-30",
"runtime": "shiny",
"softwarePaperCitation": null,
"spatial": {
"files": [],
"union": []
},
"temporal": {
"begin": "2016-11-30T00:00:00",
"end": "2016-12-08T13:55:02"
},
"title": "Reproducible research in Geosciences",
"version": null
},
"o2r": {
"author": [
{
"affiliation": [],
"name": "Markus Konkol",
"orcid": "0000-0002-4898-0314"
}
],
"community": "o2r",
"date": "30 November 2016",
"depends": [
{
"category": "CRAN Top100",
"identifier": "shiny",
"packageSystem": "https://cloud.r-project.org/",
"version": null
},
{
"category": "none",
"identifier": "likert",
"packageSystem": "https://cloud.r-project.org/",
"version": null
}
],
"description": null,
"ercIdentifier": "g5G4c",
"file": {
"filename": "main.Rmd",
"filepath": "g5G4c/data/main.Rmd",
"mimetype": "text/markdown"
},
"generatedBy": "o2r-meta metaextract.py",
"inputfiles": [
"/tmp/o2r/compendium/g5G4c/data/quest.csv"
],
"interaction": {
"interactive": true
},
"keywords": [],
"license": null,
"output": {
"html_document": {
"number_sections": true
}
},
"paperLanguage": [
"en"
],
"paperSource": "main.Rmd",
"publicationDate": null,
"r_comment": [
{
"feature": "comment",
"line": 29,
"text": "sum of "
},
{
"feature": "comment",
"line": 32,
"text": "sum of "
},
{
"feature": "comment",
"line": 37,
"text": "sum of "
},
{
"feature": "comment",
"line": 81,
"text": "Participants"
},
{
"feature": "comment",
"line": 84,
"text": "What are you doing in the context of scientific publications"
},
{
"feature": "comment",
"line": 86,
"text": "sum of "
},
{
"feature": "comment",
"line": 89,
"text": "sum of "
},
{
"feature": "comment",
"line": 92,
"text": "sum of "
},
{
"feature": "comment",
"line": 118,
"text": "print"
},
{
"feature": "comment",
"line": 119,
"text": "print"
},
{
"feature": "comment",
"line": 120,
"text": "print"
},
{
"feature": "comment",
"line": 123,
"text": "What are your research fields"
},
{
"feature": "comment",
"line": 192,
"text": "Please tell us your age"
},
{
"feature": "comment",
"line": 198,
"text": "Please tell us your gender"
},
{
"feature": "comment",
"line": 203,
"text": "Reproducible research"
},
{
"feature": "comment",
"line": 237,
"text": "Interaction"
},
{
"feature": "comment",
"line": 239,
"text": "Relating to your last five publications"
},
{
"feature": "comment",
"line": 262,
"text": "While reading a scientific publication that is related to my own research work"
},
{
"feature": "comment",
"line": 273,
"text": "It would be useful for my research work"
},
{
"feature": "comment",
"line": 283,
"text": "For my research work I would like to search for other scientific publications on the web by using"
}
],
"r_input": [
{
"feature": "data input",
"line": 8,
"text": "quest.csv"
}
],
"r_output": [
{
"feature": "result",
"line": 67,
"text": "plot"
},
{
"feature": "result",
"line": 69,
"text": "plot"
},
{
"feature": "result",
"line": 76,
"text": "plot"
},
{
"feature": "result",
"line": 77,
"text": "print"
},
{
"feature": "result",
"line": 112,
"text": "plot"
},
{
"feature": "result",
"line": 118,
"text": "print"
},
{
"feature": "result",
"line": 119,
"text": "print"
},
{
"feature": "result",
"line": 120,
"text": "print"
},
{
"feature": "result",
"line": 179,
"text": "plot"
},
{
"feature": "result",
"line": 182,
"text": "print"
},
{
"feature": "result",
"line": 183,
"text": "print"
},
{
"feature": "result",
"line": 184,
"text": "print"
}
],
"recordDateCreated": "2017-03-30",
"runtime": "shiny",
"softwarePaperCitation": null,
"spatial": {
"geometry": {
"type": "polygon",
"coordinates": [
[ [-93.0, 66.0], [-96.0, 50.0], [-129.0, 50.0], [-131.0, 66.0], [-93.0, 66.0] ]
]
}
},
"temporal": {
"begin": "2017-08-01T22:00:00.000Z",
"end": "2017-03-30T12:35:41.142Z"
},
"title": "Reproducible research in Geosciences",
"version": null
},
"zenodo": {
"title": "Reproducible research in Geosciences"
},
"cris": {
"title": "Reproducible research in Geosciences"
},
"orcid": {
"title": "Reproducible research in Geosciences"
},
"datacite": {
"title": "Reproducible research in Geosciences"
}
},
"jobs": [],
"created": "2017-03-30T12:35:35.774Z",
"__v": 0
}'
索引映射
curl -XPUT 'localhost:9200/test/?pretty' -H 'Content-Type: application/json' -d'
{
"mappings": {
"test1":{
"properties":{
"metadata":{
"properties":{
"o2r":{
"properties":{
"spatial": {
"properties": {
"geometry": {
"type": "geo_shape",
"tree": "quadtree",
"precision": "1m"
}
}
}
}
}
}}}}}}'
我可以通過將索引映射的精度從1m更改為2m來解決此問題。 由於我的RAM位於下側,因此對空間索引的精度要求較低。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.