Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid crash during import by bumping memory limit to 8GB #540

Merged

Conversation

michaelkirk
Copy link
Contributor

This crash just started happening for me, though it's been maybe a month since I last tried a planet import.


Here's the reason for this change 🚀

When importing the planet dataset (via docker), I hit a crash part way through the WOF import. In other repositories, this has been handled by gradually bumping node's memory limits, so I'm assuming the same is OK here as WOF continues to grow.

| info: [dbclient-whosonfirst]  paused=true, transient=5, current_length=0, indexed=5329500, batch_ok=10659, batch_retries=0, failed_records=0, region=4186, ocean=7, marinearea=402, continent=8, empire=21, country=213, dependency=40, disputed=205, macroregion=99, persec=1050, macrocounty=478, county=41686, localadmin=138493, locality=4861126, borough=461, macrohood=1232, neighbourhood=280843
| <--- Last few GCs --->
| [1:0x5d39450]  3812811 ms: Scavenge 4872.9 (6017.4) -> 4866.3 (6020.2) MB, 13.2 / 0.0 ms  (average mu = 0.175, current mu = 0.171) allocation failure
| [1:0x5d39450]  3812858 ms: Scavenge 4877.7 (6020.2) -> 4871.1 (6022.7) MB, 13.4 / 0.0 ms  (average mu = 0.175, current mu = 0.171) allocation failure
| [1:0x5d39450]  3812903 ms: Scavenge 4882.5 (6022.7) -> 4875.9 (6025.7) MB, 13.2 / 0.0 ms  (average mu = 0.175, current mu = 0.171) allocation failure
| <--- JS stacktrace --->
| FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
|  1: 0xb090e0 node::Abort() [node]
|  2: 0xa1b70e  [node]
|  3: 0xce1a20 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
|  4: 0xce1dc7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
|  5: 0xe99435  [node]
|  6: 0xe99f16  [node]
|  7: 0xea843e  [node]
|  8: 0xea8e80 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
|  9: 0xeabdfe v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
| 10: 0xe6d1af v8::internal::Factory::AllocateRawWithAllocationSite(v8::internal::Handle<v8::internal::Map>, v8::internal::AllocationType, v8::internal::Handle<v8::internal::AllocationSite>) [node]
| 11: 0xe74adc v8::internal::Factory::NewJSObjectFromMap(v8::internal::Handle<v8::internal::Map>, v8::internal::AllocationType, v8::internal::Handle<v8::internal::AllocationSite>) [node]
| 12: 0xe75105 v8::internal::Factory::NewJSArrayWithUnverifiedElements(v8::internal::Handle<v8::internal::FixedArrayBase>, v8::internal::ElementsKind, int, v8::internal::AllocationType) [node]
| 13: 0xe75372 v8::internal::Factory::NewJSArray(v8::internal::ElementsKind, int, int, v8::internal::ArrayStorageAllocationMode, v8::internal::AllocationType) [node]
| 14: 0xf85341 v8::internal::JsonParser<unsigned short>::BuildJsonArray(v8::internal::JsonParser<unsigned short>::JsonContinuation const&, v8::base::SmallVector<v8::internal::Handle<v8::internal::Object>, 16ul> const&) [node]
| 15: 0xf8cf84 v8::internal::JsonParser<unsigned short>::ParseJsonValue() [node]
| 16: 0xf8dd7f v8::internal::JsonParser<unsigned short>::ParseJson() [node]
| 17: 0xd6394b v8::internal::Builtin_JsonParse(int, unsigned long*, v8::internal::Isolate*) [node]
| 18: 0x15d9f39  [node]

Here's how others can test the changes 👀

I ran the planet import in docker, but haven't tried anything outside of that context.

@orangejulius orangejulius merged commit 470d0f5 into pelias:master Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants