ethersphere / swarm-cli

Manage your Bee node and interact with the Swarm network via the CLI
BSD 3-Clause "New" or "Revised" License
48 stars 21 forks source link

It takes long time to return to shell after error #316

Open agazso opened 2 years ago

agazso commented 2 years ago

Sometimes it may take 30 seconds on my older computer to return to the shell after an error. For example if I try to upload a file that is too big to the gateway, it prints There may be additional information in the Bee logs. but then it seems to get stuck and after waiting several seconds it returns the control to the shell.

Cafe137 commented 2 years ago

await this.bee.uploadFile keeps the socket open to the Bee node, even though the request already errored out.

Then I guess it uploads all the data anyway, even though the HTTP 413 has already been received.

Tested with 11M and 500M file, and there was a significant difference between the timings, hence why I think sending the data happens anyway.

I can verify this later with a reverse proxy printing body chunk flow.

Cafe137 commented 2 years ago

FYI @AuHau

I will be testing this later, but maybe you have already encountered this issue?