misskey-dev / misskey

🌎 A completely free and open interplanetary microblogging platform 🚀
https://misskey-hub.net/
GNU Affero General Public License v3.0
10.06k stars 1.37k forks source link

Update fail (12.47.1 -> 12.50.0) #6763

Closed kazukyakayashi closed 4 years ago

kazukyakayashi commented 4 years ago

💡 Summary

I wanted to update my public instance but impossible, the installation stops. I did the same update on my other server which is exactly the same (Hetzner server), with 2go of RAM and no problem. I don't understand, I'm not an expert either ...

☹️ Actual Behavior

yarn run v1.22.5
$ webpack && gulp build
37% building 1/2 entries 2458/2518 dependencies 449/1400 modulesBrowserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
92% sealing asset processing TerserPlugin
<--- Last few GCs --->

[2436:0x62ff840]   205035 ms: Mark-sweep 932.3 (985.4) -> 924.4 (985.6) MB, 2424.6 / 0.0 ms  (average mu = 0.102, current mu = 0.027) allocation failure scavenge might not succeed
[2436:0x62ff840]   207863 ms: Mark-sweep 933.0 (986.0) -> 925.1 (986.1) MB, 2746.9 / 0.0 ms  (average mu = 0.064, current mu = 0.029) allocation failure scavenge might not succeed

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0xa03520 node::Abort() [webpack]
 2: 0x94e471 node::FatalError(char const*, char const*) [webpack]
 3: 0xb7763e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [webpack]
 4: 0xb779b7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [webpack]
 5: 0xd32245  [webpack]
 6: 0xd32dcf  [webpack]
 7: 0xd40e5b v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [webpack]
 8: 0xd44a1c v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [webpack]
 9: 0xd130fb v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [webpack]
10: 0x105909f v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [webpack]
11: 0x13ff079  [webpack]
Aborted
error Command failed with exit code 134.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I also typed the command: npx browserslist@latest --update-db and restarted the update but this message still appears.

📌 Environment

okpierre commented 4 years ago

@kazukyakayashi try running NODE_OPTIONS=--max_old_space_size=2048 and then go through the entire update process again

kazukyakayashi commented 4 years ago

I tested but without any result, I tried to put this option everywhere it was possible to put it, and even putting even less than 2048.

So I increased the server's RAM, and it works, but I still don't understand why on one of the two servers I don't have this problem.

Thanks for the help