fraction / oasis

Free, open-source, peer-to-peer social application that helps you follow friends and discover new ones on Secure Scuttlebutt (SSB).
http://oasis-demo.fraction.io
GNU Affero General Public License v3.0
287 stars 42 forks source link

Memory requirements? #445

Closed justinabrahms closed 3 years ago

justinabrahms commented 4 years ago

What's the problem you want solved?

I was running oasis on a webserver I have. It has 1 gb ram, 2 gb swap. I got a OOM error. What are the requirements around memory for this do you think?

Is there a solution you'd like to recommend?

justin@octiron:~/src/oasis$ npm run start

> @fraction/oasis@2.16.0 start /home/justin/src/oasis
> node src/index.js

  oasis No configuration file found at /home/justin/.config/oasis/default.json, using built-in default values. +0ms
error loading sodium bindings: Cannot find module 'sodium-native'
Require stack:
- /home/justin/src/oasis/node_modules/chloride/bindings.js
- /home/justin/src/oasis/node_modules/chloride/index.js
- /home/justin/src/oasis/node_modules/ssb-keys/index.js
- /home/justin/src/oasis/node_modules/ssb-client/index.js
- /home/justin/src/oasis/src/ssb.js
- /home/justin/src/oasis/src/index.js
falling back to javascript version.
  oasis Listening on http://localhost:3000 +2s
  oasis Starting Scuttlebutt service +0ms
ssb-friends: stream legacy api used

<--- Last few GCs --->

[9251:0x50a4560]   407985 ms: Mark-sweep 488.9 (495.9) -> 487.0 (495.9) MB, 1300.4 / 0.0 ms  (average mu = 0.159, current mu = 0.124) allocation failure scavenge might not succeed
[9251:0x50a4560]   409449 ms: Mark-sweep 489.5 (496.5) -> 487.1 (495.9) MB, 1401.3 / 0.0 ms  (average mu = 0.102, current mu = 0.043) allocation failure scavenge might not succeed

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0xa295e0 node::Abort() [node]
 2: 0x9782df node::FatalError(char const*, char const*) [node]
 3: 0xb99c2e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xb99fa7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xd3a3b5  [node]
 6: 0xd3ad5b v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node]
 7: 0xd48b52 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
 8: 0xd499a5 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 9: 0xd4c36c v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
10: 0xd1ba0b v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
11: 0x104bdaf v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
12: 0x13a5a99  [node]
Aborted (core dumped)
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! @fraction/oasis@2.16.0 start: `node src/index.js`
npm ERR! Exit status 134
npm ERR!
npm ERR! Failed at the @fraction/oasis@2.16.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
christianbundy commented 4 years ago

Was this happening on the stable version, or master? There was an OOM bug that's been recently resolved but hasn't been released as a stable version: https://github.com/fraction/oasis/pull/427

justinabrahms commented 4 years ago

Master. Just restarting the process until it finished indexing seemed to make relevant progress. I'll update. Thanks.

On Tue, May 19, 2020, at 7:21 AM, Christian Bundy wrote:

Was this happening on the stable version, or master? There was an OOM bug that's been recently resolved but hasn't been released as a stable version: #427 https://github.com/fraction/oasis/pull/427

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fraction/oasis/issues/445#issuecomment-630851401, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAA6DM6Z3LQXUUAQNGKRZLRSKIU5ANCNFSM4NEVYK2Q.

Powersource commented 3 years ago

Hoping this was fixed? Comment if you're still running into this