[GH-ISSUE #354] Document Size error in Docker version of document server #180

Closed
opened 2026-02-26 10:30:37 +03:00 by kerem · 24 comments
Owner

Originally created by @joelchittum on GitHub (Apr 21, 2021).
Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/354

Do you want to request a feature or report a bug? Bug

What is the current behavior? The document server will not open any file over 50MB

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. I setup a new copy of the document server in a docker container enabled the example in the container and tried to upload a 150MB xlsx file as well as a 100MB docx file but the error I received is Upload error

What is the expected behavior? should open the document for editing

Did this work in previous versions of DocumentServer? No I was unable to get this to work in Docker Container versions, onlyoffice/documentserver:latest, onlyoffice/documentserver:6.2.1, onlyoffice/documentserver:6.2.0, onlyoffice/documentserver:6.1

DocumentServer Docker tag: onlyoffice/documentserver:latest

Host Operating System: Manjaro 20, Centos 7

I updated the values in default.json:

"FileConverter": {
          "converter": {
                  "maxDownloadBytes": 10485760000000000,
                  "downloadTimeout": {
                          "connectionAndInactivity": "10s",
                          "wholeCycle": "2m"
                  },
                  "downloadAttemptMaxCount": 3,
                  "downloadAttemptDelay": 1000,
                  "maxprocesscount": 1,
                  "fontDir": "null",
                  "presentationThemesDir": "null",
                  "x2tPath": "null",
                  "docbuilderPath": "null",
                  "docbuilderAllFontsPath": "null",
                  "args": "",
                  "spawnOptions": {},
                  "errorfiles": "",
                  "streamWriterBufferSize": 8388608,
                  "maxRedeliveredCount": 2,
                  "inputLimits": [
                          {
                          "type": "docx;dotx;docm;dotm",
                          "zip": {
                                  "uncompressed": "500000MB",
                                  "template": "*.xml"
                          }
                          },
                          {
                          "type": "xlsx;xltx;xlsm;xltm",
                          "zip": {
                                  "uncompressed": "300000MB",
                                 "template": "*.xml"
                          }
                          },
                          {
                          "type": "pptx;ppsx;potx;pptm;ppsm;potm",
                          "zip": {
                                  "uncompressed": "500000MB",
                                  "template": "*.xml"
                          }
                          }
                  ]
          }
  }
Originally created by @joelchittum on GitHub (Apr 21, 2021). Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/354 **Do you want to request a *feature* or report a *bug*?** Bug **What is the current behavior?** The document server will not open any file over 50MB **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.** I setup a new copy of the document server in a docker container enabled the example in the container and tried to upload a 150MB xlsx file as well as a 100MB docx file but the error I received is Upload error **What is the expected behavior?** should open the document for editing **Did this work in previous versions of DocumentServer?** No I was unable to get this to work in Docker Container versions, onlyoffice/documentserver:latest, onlyoffice/documentserver:6.2.1, onlyoffice/documentserver:6.2.0, onlyoffice/documentserver:6.1 **DocumentServer Docker tag:** onlyoffice/documentserver:latest **Host Operating System:** Manjaro 20, Centos 7 I updated the values in default.json: ``` "FileConverter": { "converter": { "maxDownloadBytes": 10485760000000000, "downloadTimeout": { "connectionAndInactivity": "10s", "wholeCycle": "2m" }, "downloadAttemptMaxCount": 3, "downloadAttemptDelay": 1000, "maxprocesscount": 1, "fontDir": "null", "presentationThemesDir": "null", "x2tPath": "null", "docbuilderPath": "null", "docbuilderAllFontsPath": "null", "args": "", "spawnOptions": {}, "errorfiles": "", "streamWriterBufferSize": 8388608, "maxRedeliveredCount": 2, "inputLimits": [ { "type": "docx;dotx;docm;dotm", "zip": { "uncompressed": "500000MB", "template": "*.xml" } }, { "type": "xlsx;xltx;xlsm;xltm", "zip": { "uncompressed": "300000MB", "template": "*.xml" } }, { "type": "pptx;ppsx;potx;pptm;ppsm;potm", "zip": { "uncompressed": "500000MB", "template": "*.xml" } } ] } } ```
kerem closed this issue 2026-02-26 10:30:37 +03:00
Author
Owner

@ShockwaveNN commented on GitHub (Apr 21, 2021):

Hi again

If you tried to upload big file via /example page of DocumentServer you should also change value of server:maxFileSize key in file /etc/onlyoffice/documentserver-example/default.json

<!-- gh-comment-id:824069813 --> @ShockwaveNN commented on GitHub (Apr 21, 2021): Hi again If you tried to upload big file via `/example` page of DocumentServer you should also change value of `server:maxFileSize` key in file `/etc/onlyoffice/documentserver-example/default.json`
Author
Owner

@joelchittum commented on GitHub (Apr 21, 2021):

Thank you for the quick response. I updated that value and got the same result.

<!-- gh-comment-id:824091239 --> @joelchittum commented on GitHub (Apr 21, 2021): Thank you for the quick response. I updated that value and got the same result.
Author
Owner

@ShockwaveNN commented on GitHub (Apr 21, 2021):

Could you attach your file and screenshot of error?

<!-- gh-comment-id:824095621 --> @ShockwaveNN commented on GitHub (Apr 21, 2021): Could you attach your file and screenshot of error?
Author
Owner

@joelchittum commented on GitHub (Apr 21, 2021):

This is a cat of the err.log:
image

This is a screenshot of the error message: image
The file I am using is too large to upload it is over 200MB

<!-- gh-comment-id:824103756 --> @joelchittum commented on GitHub (Apr 21, 2021): This is a cat of the err.log: ![image](https://user-images.githubusercontent.com/10146922/115570051-cd182e80-a28b-11eb-8e34-d874e312247c.png) This is a screenshot of the error message: ![image](https://user-images.githubusercontent.com/10146922/115568965-c89f4600-a28a-11eb-91f1-9cf17bec34f9.png) The file I am using is too large to upload it is over 200MB
Author
Owner

@joelchittum commented on GitHub (Apr 21, 2021):

Here is a download link for the excel file.
https://drive.google.com/file/d/1cczTkLnomcQax1gypDudkYg-edLb598H/view?usp=sharing

<!-- gh-comment-id:824109243 --> @joelchittum commented on GitHub (Apr 21, 2021): Here is a download link for the excel file. https://drive.google.com/file/d/1cczTkLnomcQax1gypDudkYg-edLb598H/view?usp=sharing
Author
Owner

@ShockwaveNN commented on GitHub (Apr 21, 2021):

Aha, agree with you

Seems there is also limitation on nginx side

You should add client_max_body_size 1000M; in
/etc/onlyoffice/documentserver-example/nginx/includes/ds-example.conf

and I think same for all other nginx configs

Please do not forget restart it afterwards

<!-- gh-comment-id:824151893 --> @ShockwaveNN commented on GitHub (Apr 21, 2021): Aha, agree with you Seems there is also limitation on nginx side You should add `client_max_body_size 1000M;` in /etc/onlyoffice/documentserver-example/nginx/includes/ds-example.conf and I think same for all other nginx configs Please do not forget restart it afterwards
Author
Owner

@ShockwaveNN commented on GitHub (Apr 21, 2021):

Also I was wrong - /etc/onlyoffice/documentserver-example/production-linux.json need to be changed, not /etc/onlyoffice/documentserver-example/default.json

<!-- gh-comment-id:824157971 --> @ShockwaveNN commented on GitHub (Apr 21, 2021): Also I was wrong - `/etc/onlyoffice/documentserver-example/production-linux.json` need to be changed, not `/etc/onlyoffice/documentserver-example/default.json`
Author
Owner

@ShockwaveNN commented on GitHub (Apr 21, 2021):

Aaand finally I see your file is password protected

<!-- gh-comment-id:824158259 --> @ShockwaveNN commented on GitHub (Apr 21, 2021): Aaand finally I see your file is password protected
Author
Owner

@joelchittum commented on GitHub (Apr 21, 2021):

I seem to get the same error after updating the production-linux.json and nginx client_max_body_size.

<!-- gh-comment-id:824165041 --> @joelchittum commented on GitHub (Apr 21, 2021): I seem to get the same error after updating the production-linux.json and nginx client_max_body_size.
Author
Owner

@ShockwaveNN commented on GitHub (Apr 21, 2021):

Did you restarted nginx?
I was able to get to password screen with those steps
image

  1. Increase server:maxFileSize in /etc/onlyoffice/documentserver-example/production-linux.json
  2. Add client_max_body_size 1000M; to /etc/onlyoffice/documentserver-example/nginx/includes/ds-example.conf like this:
    image
  3. Change FileConverter:converter:maxDownloadBytes and 3 input in inputLimits
  4. Restart nginx and all supervisorctl restart all
<!-- gh-comment-id:824176344 --> @ShockwaveNN commented on GitHub (Apr 21, 2021): Did you restarted nginx? I was able to get to password screen with those steps ![image](https://user-images.githubusercontent.com/668524/115584894-d3ca9400-a2d3-11eb-8db4-738bb0c3a682.png) 1. Increase `server:maxFileSize` in `/etc/onlyoffice/documentserver-example/production-linux.json` 2. Add `client_max_body_size 1000M;` to `/etc/onlyoffice/documentserver-example/nginx/includes/ds-example.conf` like this: ![image](https://user-images.githubusercontent.com/668524/115584683-a251c880-a2d3-11eb-904e-0ade323e6054.png) 3. Change `FileConverter:converter:maxDownloadBytes` and 3 input in `inputLimits` 4. Restart nginx and all `supervisorctl restart all`
Author
Owner

@joelchittum commented on GitHub (Apr 21, 2021):

I followed the exact steps you have outlined in your previous post I have continued to get the same error. Is there a specific version of document server you are using.

<!-- gh-comment-id:824191629 --> @joelchittum commented on GitHub (Apr 21, 2021): I followed the exact steps you have outlined in your previous post I have continued to get the same error. Is there a specific version of document server you are using.
Author
Owner

@ShockwaveNN commented on GitHub (Apr 21, 2021):

I've using 6.2.2, but I don't think it's related

Are you got any errors in nginx logs or browser cobsole?

On Wed, 21 Apr 2021, 19:22 Joel Chittum, @.***> wrote:

I followed the exact steps you have outlined in your previous post I have
continued to get the same error. Is there a specific version of document
server you are using.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/354#issuecomment-824191629,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAFDG3CQTKSNR4434GTJMOTTJ33VBANCNFSM43KKKC2A
.

<!-- gh-comment-id:824194701 --> @ShockwaveNN commented on GitHub (Apr 21, 2021): I've using 6.2.2, but I don't think it's related Are you got any errors in nginx logs or browser cobsole? On Wed, 21 Apr 2021, 19:22 Joel Chittum, ***@***.***> wrote: > I followed the exact steps you have outlined in your previous post I have > continued to get the same error. Is there a specific version of document > server you are using. > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/354#issuecomment-824191629>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AAFDG3CQTKSNR4434GTJMOTTJ33VBANCNFSM43KKKC2A> > . >
Author
Owner

@joelchittum commented on GitHub (Apr 21, 2021):

Browser console error is: Failed to load resource: the server responded with a status of 413 (Request Entity Too Large)
Nginx logs: 2021/04/21 16:12:42 [error] 5974#5974: *144 client intended to send too large body: 221587234 bytes, client: 172.17.0.1, server: , request: "POST /example/upload? HTTP/1.1", host: "localhost", referrer: "http://localhost/example/"

<!-- gh-comment-id:824195445 --> @joelchittum commented on GitHub (Apr 21, 2021): Browser console error is: Failed to load resource: the server responded with a status of 413 (Request Entity Too Large) Nginx logs: 2021/04/21 16:12:42 [error] 5974#5974: *144 client intended to send too large body: 221587234 bytes, client: 172.17.0.1, server: , request: "POST /example/upload? HTTP/1.1", host: "localhost", referrer: "http://localhost/example/"
Author
Owner

@ShockwaveNN commented on GitHub (Apr 21, 2021):

This is decently nginx side problem, are you applied step 2 correctly?

/etc/onlyoffice/documentserver-example/nginx/includes/ds-example.conf

Show this file

<!-- gh-comment-id:824197261 --> @ShockwaveNN commented on GitHub (Apr 21, 2021): This is decently nginx side problem, are you applied step 2 correctly? /etc/onlyoffice/documentserver-example/nginx/includes/ds-example.conf Show this file
Author
Owner

@joelchittum commented on GitHub (Apr 21, 2021):

image

<!-- gh-comment-id:824198365 --> @joelchittum commented on GitHub (Apr 21, 2021): ![image](https://user-images.githubusercontent.com/10146922/115589267-a5ca5d00-a29d-11eb-9a38-980444d46b3b.png)
Author
Owner

@ShockwaveNN commented on GitHub (Apr 21, 2021):

Hm, seems I've added also to default nginx config in /etc/nginx/nginx.conf

Maybe this is the reason

<!-- gh-comment-id:824203248 --> @ShockwaveNN commented on GitHub (Apr 21, 2021): Hm, seems I've added also to default nginx config in /etc/nginx/nginx.conf Maybe this is the reason
Author
Owner

@joelchittum commented on GitHub (Apr 21, 2021):

I have now added the client max to nginx.conf and still same issue.

<!-- gh-comment-id:824216225 --> @joelchittum commented on GitHub (Apr 21, 2021): I have now added the client max to nginx.conf and still same issue.
Author
Owner

@ShockwaveNN commented on GitHub (Apr 22, 2021):

Ok, to be clear, I've started new container of onlyoffice/documentserver:6.2.2

And run those:

#!/usr/bin/env bash

sed -i -e 's/104857600/10485760000/g' /etc/onlyoffice/documentserver-example/production-linux.json

sed -i '9iclient_max_body_size 1000M;' /etc/onlyoffice/documentserver-example/nginx/includes/ds-example.conf
sed -i '16iclient_max_body_size 1000M;' /etc/nginx/nginx.conf

sed -i -e 's/104857600/10485760000/g' /etc/onlyoffice/documentserver/default.json
sed -i -e 's/50MB/5000MB/g' /etc/onlyoffice/documentserver/default.json
sed -i -e 's/300MB/3000MB/g' /etc/onlyoffice/documentserver/default.json

service nginx restart
supervisorctl restart all

And after that I cannot see password prompt for your file

<!-- gh-comment-id:824678415 --> @ShockwaveNN commented on GitHub (Apr 22, 2021): Ok, to be clear, I've started new container of `onlyoffice/documentserver:6.2.2` And run those: ``` #!/usr/bin/env bash sed -i -e 's/104857600/10485760000/g' /etc/onlyoffice/documentserver-example/production-linux.json sed -i '9iclient_max_body_size 1000M;' /etc/onlyoffice/documentserver-example/nginx/includes/ds-example.conf sed -i '16iclient_max_body_size 1000M;' /etc/nginx/nginx.conf sed -i -e 's/104857600/10485760000/g' /etc/onlyoffice/documentserver/default.json sed -i -e 's/50MB/5000MB/g' /etc/onlyoffice/documentserver/default.json sed -i -e 's/300MB/3000MB/g' /etc/onlyoffice/documentserver/default.json service nginx restart supervisorctl restart all ``` And after that I cannot see password prompt for your file
Author
Owner

@joelchittum commented on GitHub (Apr 22, 2021):

Thank you very much this worked as expected and I will close the issue now.

<!-- gh-comment-id:824809261 --> @joelchittum commented on GitHub (Apr 22, 2021): Thank you very much this worked as expected and I will close the issue now.
Author
Owner

@ShockwaveNN commented on GitHub (Apr 22, 2021):

Didn't you find reason why previos variants are not working?

<!-- gh-comment-id:824811006 --> @ShockwaveNN commented on GitHub (Apr 22, 2021): Didn't you find reason why previos variants are not working?
Author
Owner

@joelchittum commented on GitHub (Apr 22, 2021):

I was missing some of the edits when updating the files is why it was not working for me.

<!-- gh-comment-id:824814592 --> @joelchittum commented on GitHub (Apr 22, 2021): I was missing some of the edits when updating the files is why it was not working for me.
Author
Owner

@xvybihal commented on GitHub (Dec 8, 2021):

Sorry to resurrect old issue. Would it be possible to add an option to mangle these limits by env-file instead of editing inside of the container?

For example, my suggestion would be:

NGINX_CLIENT_MAX_BODY_SIZE=100M
MAX_FILE_SIZE=104857600
MAX_DOWNLOAD_BYTES=104857600
INPUT_LIMIT_UNCOMPRESSED_DOC=50MB
INPUT_LIMIT_UNCOMPRESSED_XLS=300MB
INPUT_LIMIT_UNCOMPRESSED_PPT=50MB

<!-- gh-comment-id:988708361 --> @xvybihal commented on GitHub (Dec 8, 2021): Sorry to resurrect old issue. Would it be possible to add an option to mangle these limits by env-file instead of editing inside of the container? For example, my suggestion would be: `NGINX_CLIENT_MAX_BODY_SIZE`=`100M` `MAX_FILE_SIZE`=`104857600` `MAX_DOWNLOAD_BYTES`=`104857600` `INPUT_LIMIT_UNCOMPRESSED_DOC`=`50MB` `INPUT_LIMIT_UNCOMPRESSED_XLS`=`300MB` `INPUT_LIMIT_UNCOMPRESSED_PPT`=`50MB`
Author
Owner

@ShockwaveNN commented on GitHub (Dec 8, 2021):

@xvybihal Hi, I think it's a good idea

Could you create new issue for this idea, so it will be easier to track

<!-- gh-comment-id:988709391 --> @ShockwaveNN commented on GitHub (Dec 8, 2021): @xvybihal Hi, I think it's a good idea Could you create new issue for this idea, so it will be easier to track
Author
Owner

@urnash commented on GitHub (Dec 7, 2022):

I had a similar problem and I solved it very simply by editing
/etc/onlyoffice/documentserver/default.json

But recently I changed one ONLYOFFICE container to the same one and changed the parameters in the same way, and the solution with default.json did not help
I spent almost 2 days looking for a solution, downloaded and compared all the container files, I thought that last time I edited not only default.json, but something else
But the container configuration files were the same.
Finally a solution!!!

  1. download from our computer the file that I did not open in nextcloud
  2. delete the file in nextcloud
  3. upload back
  4. and that's it, the file starts to open
<!-- gh-comment-id:1340861395 --> @urnash commented on GitHub (Dec 7, 2022): I had a similar problem and I solved it very simply by editing /etc/onlyoffice/documentserver/default.json But recently I changed one ONLYOFFICE container to the same one and changed the parameters in the same way, and the solution with default.json did not help I spent almost 2 days looking for a solution, downloaded and compared all the container files, I thought that last time I edited not only default.json, but something else But the container configuration files were the same. Finally a solution!!! 1) download from our computer the file that I did not open in nextcloud 2) delete the file in nextcloud 3) upload back 4) and that's it, the file starts to open
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Docker-DocumentServer-ONLYOFFICE#180
No description provided.