Skip to main content
thomafred
Seasoned ⭐️⭐️⭐️
Seasoned ⭐️⭐️⭐️
July 13, 2023
Solved

CDF Files block writes `ReadError`

  • July 13, 2023
  • 16 replies
  • 306 views

I have implemented block-updates to work with CDF Files. This by itself works quite well, as documented here.

However, for very large files there are some problems. After some time, typically around 4 minutes, one of the block updates fail, with a simple `ReadError`. There’s no response from the API.

Some logs from our application:

DEBUG:odp.odcat.storage.cdffs.async_spec:Uploaded 133120 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/7406155183547467/wod_gld_2013.nc?sig=REDACTED&rsct=application%2Foctet-stream&sp=cw&sr=b
DEBUG:odp.odcat.storage.cdffs.async_spec:Total bytes uploaded: 2660989807
DEBUG:odp.odcat.storage.cdffs.async_spec:Data: len=5376000, MD5=6a0c0db1b66dac18ee28e8b082830667
DEBUG:odp.odcat.storage.cdffs.async_spec:Buffer cursors: start=0, end=5242880, final=False
DEBUG:httpx._client:HTTP Request: PUT https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/7406155183547467/wod_gld_2013.nc?sig=REDACTED&rsct=application%2Foctet-stream&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA94= "HTTP/1.1 201 Created"
DEBUG:odp.odcat.storage.cdffs.async_http_client:status code returned: 201
DEBUG:odp.odcat.storage.cdffs.async_spec:Uploaded 5242880 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/7406155183547467/wod_gld_2013.nc?sig=REDACTED&rsct=application%2Foctet-stream&sp=cw&sr=b
DEBUG:odp.odcat.storage.cdffs.async_spec:Total bytes uploaded: 2666232687
DEBUG:odp.odcat.storage.cdffs.async_spec:Data: len=5376000, MD5=6a0c0db1b66dac18ee28e8b082830667
DEBUG:odp.odcat.storage.cdffs.async_spec:Buffer cursors: start=5242880, end=10485760, final=False
DEBUG:httpx._client:HTTP Request: PUT https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/7406155183547467/wod_gld_2013.nc?sig=REDACTED&rsct=application%2Foctet-stream&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA98= "HTTP/1.1 201 Created"
DEBUG:odp.odcat.storage.cdffs.async_http_client:status code returned: 201
DEBUG:odp.odcat.storage.cdffs.async_spec:Uploaded 133120 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/7406155183547467/wod_gld_2013.nc?sig=REDACTED&rsct=application%2Foctet-stream&sp=cw&sr=b
DEBUG:odp.odcat.storage.cdffs.async_spec:Total bytes uploaded: 2666365807
DEBUG:odp.odcat.storage.cdffs.async_spec:Data: len=4772470, MD5=474504b7e60e0163b07bdd85bb47bfe2
DEBUG:odp.odcat.storage.cdffs.async_spec:Buffer cursors: start=0, end=4772470, final=True
ERROR:odp.odcat.storage.cdffs.async_files:A transport error occurred while requesting https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/7406155183547467/wod_gld_2013.nc?sig=REDACTED&rsct=application%2Foctet-stream&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA+A=.
WARNING:odp.odcat.storage.cdffs.async_spec:, retrying in 1.0...
ERROR:odp.odcat.storage.cdffs.async_files:A transport error occurred while requesting https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/7406155183547467/wod_gld_2013.nc?sig=REDACTED&rsct=application%2Foctet-stream&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA+A=.
WARNING:odp.odcat.storage.cdffs.async_spec:, retrying in 2.0...
ERROR:odp.odcat.storage.cdffs.async_files:A transport error occurred while requesting https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/7406155183547467/wod_gld_2013.nc?sig=REDACTED&rsct=application%2Foctet-stream&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA+A=.
WARNING:odp.odcat.storage.cdffs.async_spec:, retrying in 4.0...
ERROR:odp.odcat.storage.cdffs.async_files:A transport error occurred while requesting https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/7406155183547467/wod_gld_2013.nc?sig=REDACTED&rsct=application%2Foctet-stream&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA+A=.
WARNING:odp.odcat.storage.cdffs.async_spec:, retrying in 8.0...
ERROR:odp.odcat.storage.cdffs.async_files:A transport error occurred while requesting https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/7406155183547467/wod_gld_2013.nc?sig=REDACTED&rsct=application%2Foctet-stream&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA+A=.
ERROR:blacksheep.server:Unhandled exception - "PATCH /data/catalog.hubocean.io/dataset/test-dataset/wod_gld_2013.nc"
Traceback (most recent call last):
File "blacksheep/baseapp.pyx", line 84, in blacksheep.baseapp.BaseApplication.handle
File "/home/tom/project/odf/BlackSheep/blacksheep/middlewares.py", line 6, in middleware_wrapper
return await handler(request, next_handler)
File "/home/tom/project/odf/app-odcat/sdk/odp/odcat/api/middlewares/prometheus_middleware.py", line 116, in __call__
raise e from None
File "/home/tom/project/odf/app-odcat/sdk/odp/odcat/api/middlewares/prometheus_middleware.py", line 113, in __call__
response = await handler(request)
File "/home/tom/project/odf/BlackSheep/blacksheep/server/normalization.py", line 459, in handler
response = await method(*values)
File "/home/tom/project/odf/app-odcat/controllers/storage-raw/odcat/storage_raw/handlers/raw_storage_handler.py", line 380, in upload_file_by_dataset_qname
return await self._upload_file(
File "/home/tom/project/odf/app-odcat/sdk/odp/odcat/utils/http_exc.py", line 31, in handler
return ensure_response(await next_handler(*args, **kwargs))
File "/home/tom/project/odf/app-odcat/controllers/storage-raw/odcat/storage_raw/handlers/raw_storage_handler.py", line 172, in _upload_file
async with file_store.open(file_info, "wb") as fd:
File "/usr/lib64/python3.10/contextlib.py", line 206, in __aexit__
await anext(self.gen)
File "/home/tom/project/odf/app-odcat/sdk/odp/odcat/storage/cdf/cdf_file_store.py", line 48, in open
async with super().open(
File "/usr/lib64/python3.10/contextlib.py", line 206, in __aexit__
await anext(self.gen)
File "/home/tom/project/odf/app-odcat/sdk/odp/odcat/storage/file_store.py", line 66, in open
async with fs.open_async(str(fname), mode, **kwargs) as fd:
File "/home/tom/.cache/pypoetry/virtualenvs/app-odcat-Dj0wURcA-py3.10/lib/python3.10/site-packages/fsspec/asyn.py", line 1020, in __aexit__
await self.close()
File "/home/tom/.cache/pypoetry/virtualenvs/app-odcat-Dj0wURcA-py3.10/lib/python3.10/site-packages/fsspec/asyn.py", line 979, in close
await self.flush(force=True)
File "/home/tom/.cache/pypoetry/virtualenvs/app-odcat-Dj0wURcA-py3.10/lib/python3.10/site-packages/fsspec/asyn.py", line 1012, in flush
if await self._upload_chunk(final=force) is not False:
File "/home/tom/project/odf/app-odcat/sdk/odp/odcat/storage/cdffs/async_spec.py", line 969, in _upload_chunk
raise RuntimeError from cognite_exp
RuntimeError
INFO: 127.0.0.1:58422 - "PATCH /data/catalog.hubocean.io/dataset/test-dataset/wod_gld_2013.nc HTTP/1.1" 500 Internal Server Error

My first thought was that the upload url expired, which is causing this issue. However after conferring with a colleague, I learned the upload URL should be valid for a week, so that shouldn’t be an issue.

Any idea what may be happening here?

Best answer by Infant Alex

Hi @thomafred, The response header `x-ms-version` indicates the service version used to serve the request and it appears from the logs that it used service version - 2020-06-12 and the maximum block size should be 4000 MiB. 

I have done some tests with much bigger (40 MB, 100 MB, 400 MB) block sizes also and I cannot observe any issues. 

16 replies

Practitioner ⭐️⭐️⭐️
July 28, 2023

@thomafred would you mind sharing some more request ids? I haven’t found anything obvious yet. 

And does the upload consistently fail after 4 minutes? 

how are you performing the upload? Do you mind sharing your script?

AndersM
Expert ⭐️⭐️⭐️⭐️
Expert ⭐️⭐️⭐️⭐️
August 15, 2023

Based on the available information this is just as likely to be an issue with the calling service and/or its network connectivity. Actionable data for us would be requestids in failure responses from the CDF API services, or if that is not available or a response is not received at all, timestamps and other details (URL, request method and headers) of requests to CDF that fail.

thomafred
Seasoned ⭐️⭐️⭐️
thomafredAuthor
Seasoned ⭐️⭐️⭐️
August 15, 2023

Apologies for the late response. I have been on holiday and have not had a chance to follow up until now.

 

Here’s a an excerpt from our logs containing the information you need. Note that this is from a separate test-run than the earlier request-ids posted.

 

DEBUG:httpx._client:HTTP Request: PUT https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA9Q= "HTTP/1.1 201 Created"
DEBUG:odp.odcat.storage.cdffs.async_http_client:status code returned: 201
DEBUG:odp.odcat.storage.cdffs.async_files:Uploaded 5242880 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA9Q=
DEBUG:odp.odcat.storage.cdffs.async_files:Response headers: Headers({'content-length': '0', 'server': 'envoy', 'x-ms-request-id': '473dd072-b01e-005d-4e5d-cf3459000000', 'x-ms-version': '2020-06-12', 'x-ms-content-crc64': 'nJTTEoX3p74=', 'x-ms-request-server-encrypted': 'true', 'date': 'Tue, 15 Aug 2023 09:44:32 GMT', 'x-envoy-upstream-service-time': '33', 'content-disposition': 'attachment', 'content-security-policy': "default-src 'none'", 'x-content-type-options': 'nosniff'})
DEBUG:odp.odcat.storage.cdffs.async_spec:Uploaded 5242880 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b
DEBUG:odp.odcat.storage.cdffs.async_spec:Total bytes uploaded: 2639352632
DEBUG:httpx._client:HTTP Request: PUT https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA9U= "HTTP/1.1 201 Created"
DEBUG:odp.odcat.storage.cdffs.async_http_client:status code returned: 201
DEBUG:odp.odcat.storage.cdffs.async_files:Uploaded 133120 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA9U=
DEBUG:odp.odcat.storage.cdffs.async_files:Response headers: Headers({'content-length': '0', 'server': 'envoy', 'x-ms-request-id': '4a6d9dd6-301e-003d-5d5d-cf767b000000', 'x-ms-version': '2020-06-12', 'x-ms-content-crc64': 'OOiCTQl/tsg=', 'x-ms-request-server-encrypted': 'true', 'date': 'Tue, 15 Aug 2023 09:44:32 GMT', 'x-envoy-upstream-service-time': '8', 'content-disposition': 'attachment', 'content-security-policy': "default-src 'none'", 'x-content-type-options': 'nosniff'})
DEBUG:odp.odcat.storage.cdffs.async_spec:Uploaded 133120 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b
DEBUG:odp.odcat.storage.cdffs.async_spec:Total bytes uploaded: 2639485752
DEBUG:httpx._client:HTTP Request: PUT https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA9Y= "HTTP/1.1 201 Created"
DEBUG:odp.odcat.storage.cdffs.async_http_client:status code returned: 201
DEBUG:odp.odcat.storage.cdffs.async_files:Uploaded 5242880 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA9Y=
DEBUG:odp.odcat.storage.cdffs.async_files:Response headers: Headers({'content-length': '0', 'server': 'envoy', 'x-ms-request-id': '62c70ecf-f01e-0059-325d-cf9851000000', 'x-ms-version': '2020-06-12', 'x-ms-content-crc64': 'B5sUZCqGb/M=', 'x-ms-request-server-encrypted': 'true', 'date': 'Tue, 15 Aug 2023 09:44:33 GMT', 'x-envoy-upstream-service-time': '33', 'content-disposition': 'attachment', 'content-security-policy': "default-src 'none'", 'x-content-type-options': 'nosniff'})
DEBUG:odp.odcat.storage.cdffs.async_spec:Uploaded 5242880 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b
DEBUG:odp.odcat.storage.cdffs.async_spec:Total bytes uploaded: 2644728632
DEBUG:httpx._client:HTTP Request: PUT https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA9c= "HTTP/1.1 201 Created"
DEBUG:odp.odcat.storage.cdffs.async_http_client:status code returned: 201
DEBUG:odp.odcat.storage.cdffs.async_files:Uploaded 133120 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA9c=
DEBUG:odp.odcat.storage.cdffs.async_files:Response headers: Headers({'content-length': '0', 'server': 'envoy', 'x-ms-request-id': '48060d75-701e-0029-285d-cf6a51000000', 'x-ms-version': '2020-06-12', 'x-ms-content-crc64': 'OOiCTQl/tsg=', 'x-ms-request-server-encrypted': 'true', 'date': 'Tue, 15 Aug 2023 09:44:33 GMT', 'x-envoy-upstream-service-time': '7', 'content-disposition': 'attachment', 'content-security-policy': "default-src 'none'", 'x-content-type-options': 'nosniff'})
DEBUG:odp.odcat.storage.cdffs.async_spec:Uploaded 133120 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b
DEBUG:odp.odcat.storage.cdffs.async_spec:Total bytes uploaded: 2644861752
DEBUG:httpx._client:HTTP Request: PUT https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA9g= "HTTP/1.1 201 Created"
DEBUG:odp.odcat.storage.cdffs.async_http_client:status code returned: 201
DEBUG:odp.odcat.storage.cdffs.async_files:Uploaded 5242880 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA9g=
DEBUG:odp.odcat.storage.cdffs.async_files:Response headers: Headers({'content-length': '0', 'server': 'envoy', 'x-ms-request-id': 'acaab76c-901e-0073-695d-cf0777000000', 'x-ms-version': '2020-06-12', 'x-ms-content-crc64': 's7LhM06u1TY=', 'x-ms-request-server-encrypted': 'true', 'date': 'Tue, 15 Aug 2023 09:44:33 GMT', 'x-envoy-upstream-service-time': '28', 'content-disposition': 'attachment', 'content-security-policy': "default-src 'none'", 'x-content-type-options': 'nosniff'})
DEBUG:odp.odcat.storage.cdffs.async_spec:Uploaded 5242880 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b
DEBUG:odp.odcat.storage.cdffs.async_spec:Total bytes uploaded: 2650104632
DEBUG:httpx._client:HTTP Request: PUT https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA9k= "HTTP/1.1 201 Created"
DEBUG:odp.odcat.storage.cdffs.async_http_client:status code returned: 201
DEBUG:odp.odcat.storage.cdffs.async_files:Uploaded 133120 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA9k=
DEBUG:odp.odcat.storage.cdffs.async_files:Response headers: Headers({'content-length': '0', 'server': 'envoy', 'x-ms-request-id': '804c1c98-101e-002f-785d-cf905d000000', 'x-ms-version': '2020-06-12', 'x-ms-content-crc64': 'SouqLKcdTTQ=', 'x-ms-request-server-encrypted': 'true', 'date': 'Tue, 15 Aug 2023 09:44:34 GMT', 'x-envoy-upstream-service-time': '10', 'content-disposition': 'attachment', 'content-security-policy': "default-src 'none'", 'x-content-type-options': 'nosniff'})
DEBUG:odp.odcat.storage.cdffs.async_spec:Uploaded 133120 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b
DEBUG:odp.odcat.storage.cdffs.async_spec:Total bytes uploaded: 2650237752
DEBUG:httpx._client:HTTP Request: PUT https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA9o= "HTTP/1.1 201 Created"
DEBUG:odp.odcat.storage.cdffs.async_http_client:status code returned: 201
DEBUG:odp.odcat.storage.cdffs.async_files:Uploaded 5242880 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA9o=
DEBUG:odp.odcat.storage.cdffs.async_files:Response headers: Headers({'content-length': '0', 'server': 'envoy', 'x-ms-request-id': '075e6934-a01e-0044-055d-cff768000000', 'x-ms-version': '2020-06-12', 'x-ms-content-crc64': 'PpssQ1+GHtI=', 'x-ms-request-server-encrypted': 'true', 'date': 'Tue, 15 Aug 2023 09:44:34 GMT', 'x-envoy-upstream-service-time': '30', 'content-disposition': 'attachment', 'content-security-policy': "default-src 'none'", 'x-content-type-options': 'nosniff'})
DEBUG:odp.odcat.storage.cdffs.async_spec:Uploaded 5242880 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b
DEBUG:odp.odcat.storage.cdffs.async_spec:Total bytes uploaded: 2655480632
DEBUG:httpx._client:HTTP Request: PUT https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA9s= "HTTP/1.1 201 Created"
DEBUG:odp.odcat.storage.cdffs.async_http_client:status code returned: 201
DEBUG:odp.odcat.storage.cdffs.async_files:Uploaded 133120 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA9s=
DEBUG:odp.odcat.storage.cdffs.async_files:Response headers: Headers({'content-length': '0', 'server': 'envoy', 'x-ms-request-id': '8972c9d9-f01e-000d-4c5d-cf576a000000', 'x-ms-version': '2020-06-12', 'x-ms-content-crc64': 'Oo0oLmNe+Xg=', 'x-ms-request-server-encrypted': 'true', 'date': 'Tue, 15 Aug 2023 09:44:34 GMT', 'x-envoy-upstream-service-time': '10', 'content-disposition': 'attachment', 'content-security-policy': "default-src 'none'", 'x-content-type-options': 'nosniff'})
DEBUG:odp.odcat.storage.cdffs.async_spec:Uploaded 133120 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b
DEBUG:odp.odcat.storage.cdffs.async_spec:Total bytes uploaded: 2655613752
DEBUG:httpx._client:HTTP Request: PUT https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA9w= "HTTP/1.1 201 Created"
DEBUG:odp.odcat.storage.cdffs.async_http_client:status code returned: 201
DEBUG:odp.odcat.storage.cdffs.async_files:Uploaded 5242880 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA9w=
DEBUG:odp.odcat.storage.cdffs.async_files:Response headers: Headers({'content-length': '0', 'server': 'envoy', 'x-ms-request-id': 'be22665d-301e-0069-6b5d-cfb940000000', 'x-ms-version': '2020-06-12', 'x-ms-content-crc64': 'pkipdenEtr8=', 'x-ms-request-server-encrypted': 'true', 'date': 'Tue, 15 Aug 2023 09:44:35 GMT', 'x-envoy-upstream-service-time': '34', 'content-disposition': 'attachment', 'content-security-policy': "default-src 'none'", 'x-content-type-options': 'nosniff'})
DEBUG:odp.odcat.storage.cdffs.async_spec:Uploaded 5242880 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b
DEBUG:odp.odcat.storage.cdffs.async_spec:Total bytes uploaded: 2660856632
DEBUG:httpx._client:HTTP Request: PUT https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA90= "HTTP/1.1 201 Created"
DEBUG:odp.odcat.storage.cdffs.async_http_client:status code returned: 201
DEBUG:odp.odcat.storage.cdffs.async_files:Uploaded 133120 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA90=
DEBUG:odp.odcat.storage.cdffs.async_files:Response headers: Headers({'content-length': '0', 'server': 'envoy', 'x-ms-request-id': '5c59b895-c01e-003a-7a5d-cfa775000000', 'x-ms-version': '2020-06-12', 'x-ms-content-crc64': '7gStfBdDJtA=', 'x-ms-request-server-encrypted': 'true', 'date': 'Tue, 15 Aug 2023 09:44:35 GMT', 'x-envoy-upstream-service-time': '7', 'content-disposition': 'attachment', 'content-security-policy': "default-src 'none'", 'x-content-type-options': 'nosniff'})
DEBUG:odp.odcat.storage.cdffs.async_spec:Uploaded 133120 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b
DEBUG:odp.odcat.storage.cdffs.async_spec:Total bytes uploaded: 2660989752
DEBUG:httpx._client:HTTP Request: PUT https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA94= "HTTP/1.1 201 Created"
DEBUG:odp.odcat.storage.cdffs.async_http_client:status code returned: 201
DEBUG:odp.odcat.storage.cdffs.async_files:Uploaded 5242880 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA94=
DEBUG:odp.odcat.storage.cdffs.async_files:Response headers: Headers({'content-length': '0', 'server': 'envoy', 'x-ms-request-id': '12a15f44-e01e-006c-5b5d-cf3e4a000000', 'x-ms-version': '2020-06-12', 'x-ms-content-crc64': '98k8VdK9KXA=', 'x-ms-request-server-encrypted': 'true', 'date': 'Tue, 15 Aug 2023 09:44:34 GMT', 'x-envoy-upstream-service-time': '30', 'content-disposition': 'attachment', 'content-security-policy': "default-src 'none'", 'x-content-type-options': 'nosniff'})
DEBUG:odp.odcat.storage.cdffs.async_spec:Uploaded 5242880 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b
DEBUG:odp.odcat.storage.cdffs.async_spec:Total bytes uploaded: 2666232632
DEBUG:httpx._client:HTTP Request: PUT https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA98= "HTTP/1.1 201 Created"
DEBUG:odp.odcat.storage.cdffs.async_http_client:status code returned: 201
DEBUG:odp.odcat.storage.cdffs.async_files:Uploaded 133120 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b&comp=block&blockid=gAAAAAAAA98=
DEBUG:odp.odcat.storage.cdffs.async_files:Response headers: Headers({'content-length': '0', 'server': 'envoy', 'x-ms-request-id': '7a26e061-801e-0056-095d-cf114e000000', 'x-ms-version': '2020-06-12', 'x-ms-content-crc64': 'OOiCTQl/tsg=', 'x-ms-request-server-encrypted': 'true', 'date': 'Tue, 15 Aug 2023 09:44:35 GMT', 'x-envoy-upstream-service-time': '6', 'content-disposition': 'attachment', 'content-security-policy': "default-src 'none'", 'x-content-type-options': 'nosniff'})
DEBUG:odp.odcat.storage.cdffs.async_spec:Uploaded 133120 bytes to https://westeurope-1.cognitedata.com/api/v1/files/storage/cognite/6723545981847516/2188674687693268/wod_gld_2013.00.nc?sig=8OyJ25tydRcTKrHZpUTSl6QAAAqf%2Bqx0Yn9Ll1OmI6A%3D&se=2023-08-22T09%3A40%3A00Z&sv=2019-02-02&rsct=text%2Fplain&sp=cw&sr=b
DEBUG:odp.odcat.storage.cdffs.async_spec:Total bytes uploaded: 2666365752

 

thomafred
Seasoned ⭐️⭐️⭐️
thomafredAuthor
Seasoned ⭐️⭐️⭐️
August 15, 2023

I did some more digging and found that it appears to be the last block that is failing. This block is significantly larger than the other blocks at 4772525 bytes, compared to 133120 bytes for the other blocks (4.55 MiB and 0.13 MiB respectively).

A quick look at the Azure-docs shows that the maximum block size for service versions prior to 2016-05-31 is 4 MiB:

 

 

Can you confirm that the maximum block size is 4 MiB?

Infant  Alex
Practitioner ⭐️⭐️⭐️
Practitioner ⭐️⭐️⭐️
August 15, 2023

Hi @thomafred, The response header `x-ms-version` indicates the service version used to serve the request and it appears from the logs that it used service version - 2020-06-12 and the maximum block size should be 4000 MiB. 

I have done some tests with much bigger (40 MB, 100 MB, 400 MB) block sizes also and I cannot observe any issues. 

Alex
thomafred
Seasoned ⭐️⭐️⭐️
thomafredAuthor
Seasoned ⭐️⭐️⭐️
August 16, 2023

Hi Alex and thanks for the input.

I can confirm that increasing the block size did not negatively impact the implementation.

Furthermore, it seems that there may have been a problem on our end related to how the block IDs were encoded. How this resulted in a transport-error baffles me a bit but overall everything appears to run smoothly now.

Thanks for the help to everyone involved :)