Lunik / Lunik-Torrent

Web torrent downloader and cloud storage.
MIT License
95 stars 89 forks source link

All the files dissapear when i add 2 or more torrents (mostly on the thrid) #229

Closed TheBestBurler closed 7 years ago

TheBestBurler commented 7 years ago

I already tested the app in 3 services,heroku,clever cloud and xervo ( the new modulus) xervo has the fastest server (beating 120mb/s somethimes), however, it has the same issue

Lunik commented 7 years ago

Disapear from where ?

TheBestBurler commented 7 years ago

from the torrent tab

TheBestBurler commented 7 years ago

Update: The issue doesn happen in the 3.0.0 version (until you add 5)

Lunik commented 7 years ago

I will investigate on it. Do you have any screen shots or errors in the web console ?

TheBestBurler commented 7 years ago

unfortunely no, but i discover something, It seems that the error is related to RAM, with 198mb I could download up to 2 torrent at one time, with 368mb I could download it up to 3 at a time, with 512mb I could get up to 5, I tested it in version 2.7.4, Seems to be a way for the server to clear memory

TheBestBurler commented 7 years ago

Logs: throw new assert.AssertionError({ 2017-03-01T12:00:41.309-03:00 ^ 2017-03-01T12:00:41.318-03:00 at queryServer (cluster.js:501:12) 2017-03-01T12:00:41.309-03:00 AssertionError: false == true 2017-03-01T12:00:41.317-03:00 at RoundRobinHandle.add (cluster.js:139:3) 2017-03-01T12:00:41.466-03:00 at Worker.onmessage (cluster.js:450:7) 2017-03-01T12:00:43.919-03:00 at ChildProcess. (cluster.js:765:8) 2017-03-01T12:00:44.819-03:00 at emitTwo (events.js:111:20) 2017-03-01T12:00:45.808-03:00 at ChildProcess.emit (events.js:191:7) 2017-03-01T12:00:45.899-03:00 at process.nextTick (internal/child_process.js:744:12) 2017-03-01T12:00:46.322-03:00 at _combinedTickCallback (internal/process/next_tick.js:67:7) 2017-03-01T12:00:46.325-03:00 at process._tickCallback (internal/process/next_tick.js:98:9) 2017-03-01T12:00:46.414-03:00 npm ERR! Linux 4.9.11+ 2017-03-01T12:00:46.418-03:00 npm ERR! argv "/home/bas/.nvm/versions/node/v6.9.3/bin/node" "/home/bas/.nvm/versions/node/v6.9.3/bin/npm" "start" 2017-03-01T12:00:46.424-03:00 npm ERR! node v6.9.3 2017-03-01T12:00:46.489-03:00 npm ERR! npm v3.10.10 2017-03-01T12:00:46.489-03:00 npm ERR! code ELIFECYCLE 2017-03-01T12:00:46.490-03:00 npm ERR! lunik-torrent@3.0.6 start: node src/index.js 2017-03-01T12:00:46.490-03:00 npm ERR! Exit status 1 2017-03-01T12:00:46.490-03:00 npm ERR! 2017-03-01T12:00:46.490-03:00 npm ERR! Failed at the lunik-torrent@3.0.6 start script 'node src/index.js'. 2017-03-01T12:00:46.490-03:00 npm ERR! Make sure you have the latest version of node.js and npm installed. 2017-03-01T12:00:46.491-03:00 npm ERR! If you do, this is most likely a problem with the lunik-torrent package, 2017-03-01T12:00:46.491-03:00 npm ERR! not with npm itself. 2017-03-01T12:00:46.491-03:00 npm ERR! Tell the author that this fails on your system: 2017-03-01T12:00:46.491-03:00 npm ERR! node src/index.js 2017-03-01T12:00:46.491-03:00 npm ERR! You can get information on how to open an issue for this project with: 2017-03-01T12:00:46.492-03:00 npm ERR! npm bugs lunik-torrent 2017-03-01T12:00:46.492-03:00 npm ERR! Or if that isn't available, you can get their info via: 2017-03-01T12:00:46.492-03:00 npm ERR! npm owner ls lunik-torrent 2017-03-01T12:00:46.492-03:00 npm ERR! There is likely additional logging output above. 2017-03-01T12:00:46.493-03:00 npm ERR! Please include the following file with any support request: 2017-03-01T12:00:46.493-03:00 npm ERR! /home/bas/app_4b386ff8-f5a2-4d59-9ecc-a81e9d90b400/npm-debug.log

when the torrents disapear: (node:1041) Warning: Possible EventEmitter memory leak detected. 11 ready listeners added. Use emitter.setMaxListeners() to increase limit 2017-03-01T12:42:30.296-03:00 [Client] [Info] Start torrent: The Elder Scrolls - Skyrim - Special Edition [FitGirl Repack] 2017-03-01T12:43:23.781-03:00 Out of memory: Kill process 1041 (node) score 718 or sacrifice child 2017-03-01T12:43:23.910-03:00 Worker 1041 died

theres other version of the error:

(node:1263) Warning: Possible EventEmitter memory leak detected. 11 ready listeners added. Use emitter.setMaxListeners() to increase limit 2017-03-01T14:50:21.729-03:00 at createUnsafeBuffer (buffer.js:38:12) 2017-03-01T14:50:21.735-03:00 at allocate (buffer.js:181:12) 2017-03-01T14:50:21.735-03:00 at Function.Buffer.allocUnsafe (buffer.js:141:10) 2017-03-01T14:50:21.735-03:00 at Buffer (buffer.js:78:19) 2017-03-01T14:50:21.736-03:00 at RandomAccessFile.read (/home/bas/app_4b386ff8-f5a2-4d59-9ecc-a81e9d90b400/node_modules/random-access-file/index.js:91:13) 2017-03-01T14:50:21.738-03:00 at /home/bas/app_4b386ff8-f5a2-4d59-9ecc-a81e9d90b400/node_modules/fs-chunk-store/index.js:193:16 2017-03-01T14:50:21.126-03:00 buffer.js:11 2017-03-01T14:50:21.738-03:00 at apply (/home/bas/app_4b386ff8-f5a2-4d59-9ecc-a81e9d90b400/node_modules/thunky/index.js:44:12) 2017-03-01T14:50:21.646-03:00 super(arg1, arg2, arg3); 2017-03-01T14:50:21.739-03:00 at _combinedTickCallback (internal/process/next_tick.js:74:11) 2017-03-01T14:50:21.725-03:00 ^ 2017-03-01T14:50:21.726-03:00 RangeError: Array buffer allocation failed 2017-03-01T14:50:21.726-03:00 at Buffer.Uint8Array (native) 2017-03-01T14:50:21.727-03:00 at FastBuffer (buffer.js:11:5) 2017-03-01T14:50:21.739-03:00 Worker 1263 died

TheBestBurler commented 7 years ago

you're trying to fix it?

Lunik commented 7 years ago

I have tried to do something in #233 . You need to select 1 duplica in your config

TheBestBurler commented 7 years ago

Torrents keep dissapearing, 1 duplica is already selected in the current master, and theres showing nothing in the web log, just (node:1263) Warning: Possible EventEmitter memory leak detected. 11 ready listeners added. Use emitter.setMaxListeners() to increase limit when i add a torrent this would be solved if you limit the connections of each torrent?