storj-archived/core

Active transfer counter doesn't count upload and mirror -> OutOfMemory Exception

Closed this issue · 1 comments

Package Versions

Replace the values below using the output from npm list storj. Use npm list -g storj if installed globally.

  * daemon: 2.5.1, core: 6.4.1, protocol: 1.1.0

Replace the values below using the output from node --version.

v4.10.2

Expected Behavior

Please describe the program's expected behavior. Include an example of your
usage code in the back ticks below if applicable.

Increase active transfer counter on starting a transfer and decrease it on complete, error or timeout. Don't send OFFER as long as there are to many active Transfers.
It should look like this:

{"level":"info","message":"authorizing download data channel for 1da92a2af36fdbdf5131fbf4b0fea974abbc039a","timestamp":"2017-04-26T15:34:12.368Z"}
{"level":"debug","message":"active transfers 1 is less than offerBackoffLimit 5: true","timestamp":"2017-04-26T15:34:18.788Z"}
{"level":"debug","message":"active transfers 1 is less than offerBackoffLimit 5: true","timestamp":"2017-04-26T15:34:20.140Z"}
{"level":"debug","message":"active transfers 1 is less than offerBackoffLimit 5: true","timestamp":"2017-04-26T15:34:24.976Z"}
{"level":"debug","message":"active transfers 1 is less than offerBackoffLimit 5: true","timestamp":"2017-04-26T15:34:25.293Z"}
{"level":"debug","message":"active transfers 1 is less than offerBackoffLimit 5: true","timestamp":"2017-04-26T15:34:28.898Z"}
{"level":"debug","message":"Shard download completed","timestamp":"2017-04-26T15:34:29.605Z"}
{"level":"debug","message":"active transfers 0 is less than offerBackoffLimit 5: true","timestamp":"2017-04-26T15:34:34.367Z"}

Actual Behavior

Please describe the program's actual behavior. Please include any stack traces
or log output in the back ticks below.

Shard upload and shard mirror do not increase the counter. My farmer will not stop sending OFFER and accept more and more active transfers. At the end my farmer will run into OutOfMemory Exception as you can see here: storj-archived/storjshare-daemon#114

{"level":"info","message":"authorizing upload data channel for 160cfffa388ac449f227f72ef34144581e4c8e2d","timestamp":"2017-04-26T15:33:31.846Z"}
{"level":"debug","message":"active transfers 0 is less than offerBackoffLimit 5: true","timestamp":"2017-04-26T15:33:33.296Z"}
{"level":"debug","message":"active transfers 0 is less than offerBackoffLimit 5: true","timestamp":"2017-04-26T15:33:39.966Z"}
{"level":"debug","message":"active transfers 0 is less than offerBackoffLimit 5: true","timestamp":"2017-04-26T15:33:42.777Z"}
{"level":"debug","message":"active transfers 0 is less than offerBackoffLimit 5: true","timestamp":"2017-04-26T15:33:43.716Z"}
{"level":"debug","message":"active transfers 0 is less than offerBackoffLimit 5: true","timestamp":"2017-04-26T15:33:44.584Z"}
{"level":"debug","message":"Shard upload completed","timestamp":"2017-04-26T15:33:50.823Z"}
{"level":"info","message":"handling mirror request from fbc19d6293b4cadd78e8fa18dd703b55a4a2282a hash 185e8776d4572dcde975e668e9802df10bced741","timestamp":"2017-04-26T15:47:18.111Z"}
{"level":"info","message":"opening data transfer with {\"userAgent\":\"6.3.2\",\"protocol\":\"1.1.0\",\"address\":\"94.213.48.115\",\"port\":4001,\"nodeID\":\"1878cd8860bd85e7db201d7f8a55b1fd52b2fdfc\",\"lastSeen\":\"2017-04-26T15:46:54.467Z\"} to mirror 185e8776d4572dcde975e668e9802df10bced741","timestamp":"2017-04-26T15:47:18.113Z"}
{"level":"debug","message":"active transfers 0 is less than offerBackoffLimit 5: true","timestamp":"2017-04-26T15:47:24.048Z"}
{"level":"debug","message":"active transfers 0 is less than offerBackoffLimit 5: true","timestamp":"2017-04-26T15:47:26.651Z"}
{"level":"debug","message":"active transfers 0 is less than offerBackoffLimit 5: true","timestamp":"2017-04-26T15:47:27.217Z"}
{"level":"info","message":"successfully mirrored shard","timestamp":"2017-04-26T15:47:27.588Z"}

👋 Hey! Thanks for this contribution. Apologies for the delay in responding!

We've decided to rearchitect Storj, so that we can scale better. You can read more about this decision here. This means that we are entirely focused on v3 at the moment, in the storj/storj repository. Our white paper for v3 is coming very, very soon - follow along on the blog and in our Rocketchat.

As this repository is part of the v2 network, we're no longer maintaining this repository. I am going to close this for now. If you have any questions, I encourage you to jump on Rocketchat and ask them there. Thanks!