Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-2131

[Direct Edit] Handle HTTP 413 error: Request Entity Too Large

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: NoFixVersionApplicable
    • Fix Version/s: 4.4.4
    • Component/s: Direct Edit

      Description

      Error

      Sentry Issue: NUXEO-DRIVE-34Q

      DirectEdit unhandled error for ref WindowsPath('DOCUID_file-content/file.docx')
      
      UploadError: UploadError: unable to upload file 'file.docx' (source: HTTPError(413), error: b'<html>\r\n<head><title>413 Request Entity Too Large</title></head>\r\n<body bgcolor="white">\r\n<center><h1>413 Request Entity Too Large</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n', server trace: None)
        File "nxdrive\direct_edit.py", line 706, in _handle_upload_queue
        File "nxdrive\client\remote_client.py", line 418, in upload
        File "nxdrive\client\remote_client.py", line 551, in upload_chunks
        File "lib\site-packages\nuxeo\uploads.py", line 331, in upload
        File "lib\site-packages\nuxeo\uploads.py", line 134, in send_data
      
      HTTPError: HTTPError(413), error: b'<html>\r\n<head><title>413 Request Entity Too Large</title></head>\r\n<body bgcolor="white">\r\n<center><h1>413 Request Entity Too Large</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n', server trace: None
        File "lib\site-packages\nuxeo\uploads.py", line 131, in send_data
        File "lib\site-packages\nuxeo\endpoint.py", line 120, in post
        File "lib\site-packages\nuxeo\client.py", line 273, in request
      
      HTTPError: 413 Client Error: Request Entity Too Large for url: https://SERVER/nuxeo/api/v1/upload/batchId-f016188a-7ad6-41dc-87ab-c32f0c092159/0
        File "lib\site-packages\nuxeo\client.py", line 270, in request
        File "lib\site-packages\requests\models.py", line 940, in raise_for_status
      

      Analysis

      When trying to upload changes in the Direct Edit queue, and if the target document is a proxy, then this error will popup everytime, filling server logs, client logs and Sentry events.

      Fix

      The root fix will be tackled by NXDRIVE-2132.
      But for the scope of this ticket, when such error happens, the upload should be skipped with a warning loggued.

      Expected result:

      • No more failure on such error.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day
                  1d