box / boxcli

A command line interface for interacting with the Box API.
https://developer.box.com
Apache License 2.0
222 stars 59 forks source link

Can I set timeout seconds for all box commands? #414

Closed YongkuiYang closed 1 year ago

YongkuiYang commented 1 year ago

Hi, We have a box commond hangs for more than one day and there is no error. can we set timeout or something else to make sure the upload/list command stoped after a period of time?

arjankowski commented 1 year ago

Hi @YongkuiYang ,

You can read how to configure timeouts here: https://github.com/box/boxcli/blob/main/docs/configuration.md#configure-how-client-retries-calls-and-handles-timeouts

But when it comes to hang commands, this is new to us.

1) What version of boxcli are you using on which operating system? 2) Does it always happen? 3) You may find useful information in the logs To see more logs you can run the command with the env DEBUG set to '*" like here: e.g:

env DEBUG='*' box folder:items 0

Regards, Artur

YongkuiYang commented 1 year ago

Hi @Artur, Thanks for your help~

  1. What version of boxcli are you using on which operating system? -- we use box cli in redhat container and box cli version is 2.6.0. @box/cli@2.6.0
  2. Does it always happen? -- No, it happend only once in a few month

    the hang command is: box folders:items --fields=id,name --csv

    the timeout settings seems only works for upload request not for get itmes request?

arjankowski commented 1 year ago

Hi @YongkuiYang ,

Version 2.x.x is EOL, so I recommend updating boxcli to the current version 3.4.0.

We don't provide an option to set a timeout for regular requests as they should be fast as opposed to downloading.

Since this error happens every few months, it's really hard to investigate and find the main issue. Moreover, I was unable to reproduce this error in my environment.

For now, the only thing I can recommend is updating the cli to the current version.

Regards, Artur

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not been updated in the last 30 days. It will be closed if no further activity occurs within the next 7 days. Feel free to reach out or mention Box SDK team member for further help and resources if they are needed.

stale[bot] commented 1 year ago

This issue has been automatically closed due to maximum period of being stale. Thank you for your contribution to Box CLI and feel free to open another PR/issue at any time.