# Consistent "upload canceled"

**URL:** <https://forum.storj.io/t/consistent-upload-canceled/15886>\
**Category:** Node Operators\
**Tags:** docker, error-codes, storagenode\
**Created:** [October 30, 2021, 5:27pm UTC](https://forum.storj.io/t/consistent-upload-canceled/15886 "2021-10-30T17:27:11Z")\
**Posts on this page:** 14\
**Page:** 2

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [November 4, 2021, 6:35am UTC](https://forum.storj.io/t/consistent-upload-canceled/15886/23 "2021-11-04T06:35:14Z")

</div>

The upload is free, so it is possible. Someone could limit nodes by IPs. They could use only geo-limited nodes for example, but why to start upload at all?

---

<div class="post-metadata">

**Author:** ![Pentium100](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/pentium100/32/6082_2.png) [@Pentium100](https://forum.storj.io/u/Pentium100)\
**Post date:** [November 4, 2021, 6:43am UTC](https://forum.storj.io/t/consistent-upload-canceled/15886/24 "2021-11-04T06:43:29Z")

</div>

Is the size shown in the log the actual size of the piece or just the amount of data that was uploaded before the upload was canceled?

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [November 4, 2021, 6:52am UTC](https://forum.storj.io/t/consistent-upload-canceled/15886/25 "2021-11-04T06:52:01Z")

</div>

Accordingly code it’s an upload size.

> <https://github.com/storj/storj/blob/2df41028a3ec9e5026c0b9691367fb6c82da8e99/storagenode/piecestore/endpoint.go#L281>

---

<div class="post-metadata">

**Author:** ![clearing](https://storj.bcdn.literatehosting.com/letter_avatar/clearing/32/6_449c533f586939b6e5f246632a46421f.png) [@clearing](https://forum.storj.io/u/clearing)\
**Post date:** [November 4, 2021, 6:58am UTC](https://forum.storj.io/t/consistent-upload-canceled/15886/26 "2021-11-04T06:58:32Z")

</div>

> [@Alexey](#):
>
> but why to start upload at all?

in my observation, when i get an upload canceled (with those sizes) the momentum of my node transactions are disrupted. im not sure if thats really a thing in satellites’ selection of node? but, if that really has an effect, then more chances for their nodes to be selected, which will get the legit transactions and eventually no need for them to do fake transaction when their storage are full of legit file pieces.

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [November 4, 2021, 7:12am UTC](https://forum.storj.io/t/consistent-upload-canceled/15886/27 "2021-11-04T07:12:05Z")

</div>

Node selection doesn’t have a such functionality, but there is a short-living cache of successful nodes, so these nodes would be offered first (if they meet the unique limit by subnet for the pieces of the same segment).

---

<div class="post-metadata">

**Author:** ![clearing](https://storj.bcdn.literatehosting.com/letter_avatar/clearing/32/6_449c533f586939b6e5f246632a46421f.png) [@clearing](https://forum.storj.io/u/clearing)\
**Post date:** [November 4, 2021, 7:28am UTC](https://forum.storj.io/t/consistent-upload-canceled/15886/28 "2021-11-04T07:28:22Z")

</div>

thanks for clarifying.

> [@Alexey](#):
>
> there is a short-living cache of successful nodes, so these nodes would be offered first

few questions about this, how do we determine the successful nodes that will be included in the cache? will the upload canceled affect that?

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [November 4, 2021, 7:47am UTC](https://forum.storj.io/t/consistent-upload-canceled/15886/29 "2021-11-04T07:47:28Z")

</div>

> [@Distribution algorithm for node selection](https://forum.storj.io/t/distribution-algorithm-for-node-selection/11239/18):
>
> Hey @hashbackup, Your investigation seems to have been fruitful - you have almost all the relevant files already. So I will focus on clarifying a few details: Firstly, we have different queries for selecting nodes in different circumstances. Many of the functions in the satellite/satellitedb/nodeselection.go file actually have nothing to do with selecting nodes for normal uploads. EDIT: we may have used some of these functions at one point for normal uploads, but it doesn’t look like anything …

You can also use the search here: [Search results for 'node selection' - Storj Community Forum (official)](https://forum.storj.io/search?expanded=true&q=node%20selection) or in the repo [GitHub - storj/storj: Ongoing Storj v3 development. Decentralized cloud object storage that is affordable, easy to use, private, and secure.](https://github.com/storj/storj)

---

<div class="post-metadata">

**Author:** ![Pentium100](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/pentium100/32/6082_2.png) [@Pentium100](https://forum.storj.io/u/Pentium100)\
**Post date:** [November 4, 2021, 5:01pm UTC](https://forum.storj.io/t/consistent-upload-canceled/15886/30 "2021-11-04T17:01:32Z")

</div>

> [@Alexey](#):
>
> Accordingly code it’s an upload size.

So, what’s up with zero-sized uploads (they are all canceled or failed)?

```auto
2021-11-04T16:22:07.381Z INFO piecestore upload canceled {"Piece ID": "Z4BPVDTD6A7U6NIDAQ25ZXYW7H4B73VBWBX4BEOZ7PF4PXTILZPA", "Satellite ID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs", "Action": "PUT", "Size": 0}

2021-11-04T14:02:49.246Z ERROR piecestore upload failed {"Piece ID": "6S36XZUTWL2RVZSICA7LRO2HXWZKZIIPT5LO5I2NYIRAIOMD4CIA", "Satellite ID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs", "Action": "PUT", "error": "unexpected EOF", "errorVerbose": "unexpected EOF\n\tstorj.io/common/rpc/rpcstatus.Error:82\n\tstorj.io/storj/storagenode/piecestore.(*Endpoint).Upload:342\n\tstorj.io/common/pb.DRPCPiecestoreDescription.Method.func1:220\n\tstorj.io/drpc/drpcmux.(*Mux).HandleRPC:33\n\tstorj.io/common/rpc/rpctracing.(*Handler).HandleRPC:58\n\tstorj.io/drpc/drpcserver.(*Server).handleRPC:104\n\tstorj.io/drpc/drpcserver.(*Server).ServeOne:60\n\tstorj.io/drpc/drpcserver.(*Server).Serve.func2:97\n\tstorj.io/drpc/drpcctx.(*Tracker).track:52", "Size": 0}

```

A customer may want to upload a zero sized file, but aren’t files below a certain size supposed to be stored on the satellite itself? I think the smallest successful upload on my node is 512B (there are quite a few of those).

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [November 4, 2021, 7:35pm UTC](https://forum.storj.io/t/consistent-upload-canceled/15886/31 "2021-11-04T19:35:43Z")

</div>

That’s interesting question. It should not be zero. The zero sized should be stored on the satellite with the metainformation altogether.

---

<div class="post-metadata">

**Author:** ![sean](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/sean/32/8744_2.png) [@sean](https://forum.storj.io/u/sean)\
**Post date:** [November 4, 2021, 9:24pm UTC](https://forum.storj.io/t/consistent-upload-canceled/15886/32 "2021-11-04T21:24:20Z")

</div>

Thanks everyone for sharing your observations! I’m starting to look a bit deeper on these cancellations now. One initial observation is they appear to be coming from mostly the same satellite: `12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S` (US1), so I will see if I can find anything out on the satellite side.

I’ve checked my own storage node logs and I’m also seeing frequent cancellations of the 163840 piece size, and the 0 size ones every so often, but not as frequent.

---

<div class="post-metadata">

**Author:** ![BrightSilence](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/brightsilence/32/6048_2.png) [@BrightSilence](https://forum.storj.io/u/BrightSilence)\
**Post date:** [November 4, 2021, 9:25pm UTC](https://forum.storj.io/t/consistent-upload-canceled/15886/33 "2021-11-04T21:25:27Z")

</div>

> [@Alexey](#):
>
> Accordingly code it’s an upload size.

If I understand the function correctly that refers to the pieceWriter.Size which looks like it’s incremented with each chunk written. I think it means this is whatever has been written so far and not the total size of the piece upload. Which also explains why 0 can happen. But please correct me if I misread that.

---

<div class="post-metadata">

**Author:** ![sean](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/sean/32/8744_2.png) [@sean](https://forum.storj.io/u/sean)\
**Post date:** [November 4, 2021, 9:38pm UTC](https://forum.storj.io/t/consistent-upload-canceled/15886/34 "2021-11-04T21:38:06Z")

</div>

> [@BrightSilence](#):
>
> If I understand the function correctly that refers to the pieceWriter.Size which looks like it’s incremented with each chunk written

That sounds correct to me, and this comment would justify that: [storj/storagenode/pieces/readwrite.go at 2df41028a3ec9e5026c0b9691367fb6c82da8e99 · storj/storj · GitHub](https://github.com/storj/storj/blob/2df41028a3ec9e5026c0b9691367fb6c82da8e99/storagenode/pieces/readwrite.go#L110)

---

<div class="post-metadata">

**Author:** ![BrightSilence](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/brightsilence/32/6048_2.png) [@BrightSilence](https://forum.storj.io/u/BrightSilence)\
**Post date:** [November 5, 2021, 12:48pm UTC](https://forum.storj.io/t/consistent-upload-canceled/15886/35 "2021-11-05T12:48:25Z")

</div>

Doesn’t it make sense then that cancellations align with the default chunk sizes being used for upload?

Any piece over 163840 bytes would at some point be that exact size, just because that’s what the previous chunk sizes add up to. The final piece size doesn’t align with exact chunk steps, so successfully finished pieces by definition have a lot more varied sizes, while anything cancelled before being finished would by definition align with standard chunks. I’d say that explains why cancellations happen at specific sizes, while successful pieces have more varied sizes.

---

<div class="post-metadata">

**Author:** ![Code\_Breaker](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/code_breaker/32/11728_2.png) [@Code\_Breaker](https://forum.storj.io/u/Code_Breaker)\
**Post date:** [November 5, 2021, 7:24pm UTC](https://forum.storj.io/t/consistent-upload-canceled/15886/36 "2021-11-05T19:24:20Z")

</div>

Sounds logical, and makes sense to me. Let me see what I can find on our end and if necessary escalate your observations. I’ll also follow up with Sean and see if he saw anything relative to US1, but I suspect that it isn’t isolated to a single satellite.

[Previous page](https://forum.storj.io/t/consistent-upload-canceled/15886.md?page=1)
