0

I've tried various ways to set the read timeout on a s3fs.S3FileSystem object such as

s3 = s3fs.S3FileSystem(s3_additional_kwargs={"read_timeout": 500}, config_kwargs={"read_timeout": 500} )

or s3.read_timeout = 500 But none of them seem to be controlling the timeout as expected. Does anyone know of the correct way to set these types of parameters?

Thanks

Andrew Gaul
  • 2,296
  • 1
  • 12
  • 19
Andy
  • 13
  • 3

1 Answers1

1

This:

S3FileSystem.read_timeout = 500

would work before the creation of any instance, since it controls the default timeout applied to instances.

If you want to set it per-instance, you need config_kwargs (passed to botocore's Config). It seems you tried this version, so it's worth following up with aiobotocore to see if their proxy AioConfig supports the argument.

Note that there are other timeouts such as connect_timeout and lower-level HTTP/socket things that you might be hitting.

mdurant
  • 27,272
  • 5
  • 45
  • 74
  • Thanks! I will try this - I think I was setting it after the creation of the instance. That was probably my error. Let me check if it works setting it before instance creation. – Andy Mar 16 '21 at 18:32