Increase Upload Limit in Documents

I noticed that there is an arbitrary 1GB limit to document upload by default. I’ve tried to increase the document upload limit on the Document feature of Workspace following this thread: Changing the 100Mb file size limit? - #6 by Constantine. However, when I run the update command, no rows are affected. When I select from tenants_quota, it returns:

mysql> select * from tenants_quota;
+--------+---------+-------------+----------------+----------------+--------------+----------+-------+-------------+---------+
| tenant | name    | description | max_file_size  | max_total_size | active_users | features | price | avangate_id | visible |
+--------+---------+-------------+----------------+----------------+--------------+----------+-------+-------------+---------+
|     -1 | default | NULL        | 10995116277760 | 10995116277760 |        10000 | update   |  0.00 | NULL        |       0 |
|      1 | api     | NULL        |           1024 |  1099511627776 |        10000 | update   |  0.00 | NULL        |       0 |
+--------+---------+-------------+----------------+----------------+--------------+----------+-------+-------------+---------+
2 rows in set (0.00 sec)

I also tried setting the values for -1 (as shown) which does not fix the issue. Any ideas about why this is not working, or are there any alternate ways to increase this limit?

Adding that I am running Community Workspace v12.7.1.1942 on Ubuntu.

Hello @ltcptgeneral
Sorry for the late reply.
10995116277760 mb equals 10737418240 Gb. Please try again, but change it to 5120 mb for a test and let us know the result.

I also tried setting the values for -1 (as shown) which does not fix the issue.

It was a sample in the Constantine command. You need to use the tenant ID which is already present in the database.

I changed the db values to this and rebooted.

But I’m still getting “The maximum file size is exceeded (1 GB)” error in the portal trying to upload a ~3 GB video file.

Did you reboot the entire server? Please just restart the monoservice according to Constantine’s guide. Will the situation change?

I’ve tried rebooting the entire server and also rebooting the monoservice using the command: docker exec -it onlyoffice-community-server service monoserve restart.

It seems strange. Please go to the host and run docker ps. Please show us the output result.

and also rebooting the monoservice using the command: docker exec -it onlyoffice-community-server service monoserve restart .

Do I understand it right that restarting Monoserve resets the database value to its default?

CONTAINER ID   IMAGE                                    COMMAND                  CREATED        STATUS      PORTS                                                                                                                                                                                                                                                                                                               NAMES
ca3b730415e6   onlyoffice/documentserver:9.0.3.1        "/app/ds/run-documen…"   2 weeks ago    Up 8 days   80/tcp, 443/tcp                                                                                                                                                                                                                                                                                                     onlyoffice-document-server
042fbdea319a   onlyoffice/communityserver:12.7.1.1942   "/app/run-community-…"   5 months ago   Up 8 days   0.0.0.0:80->80/tcp, [::]:80->80/tcp, 0.0.0.0:443->443/tcp, [::]:443->443/tcp, 3306/tcp, 5280/tcp, 9865-9866/tcp, 9871/tcp, 9882/tcp, 0.0.0.0:5222->5222/tcp, [::]:5222->5222/tcp, 9888/tcp                                                                                                                          onlyoffice-community-server
db7d540b186a   onlyoffice/controlpanel:3.5.4.541        "/var/www/onlyoffice…"   5 months ago   Up 8 days   80/tcp, 443/tcp                                                                                                                                                                                                                                                                                                     onlyoffice-control-panel
ff3b47e5c18a   onlyoffice/mailserver:1.6.75             "/bin/sh -c 'export …"   5 months ago   Up 8 days   0.0.0.0:25->25/tcp, [::]:25->25/tcp, 0.0.0.0:143->143/tcp, [::]:143->143/tcp, 0.0.0.0:465->465/tcp, [::]:465->465/tcp, 0.0.0.0:587->587/tcp, [::]:587->587/tcp, 0.0.0.0:993->993/tcp, [::]:993->993/tcp, 0.0.0.0:995->995/tcp, [::]:995->995/tcp, 3306/tcp, 0.0.0.0:4190->4190/tcp, [::]:4190->4190/tcp, 8081/tcp   onlyoffice-mail-server
6189b9faa209   mysql:8.0.29                             "docker-entrypoint.s…"   5 months ago   Up 8 days   3306/tcp, 33060/tcp                                                                                                                                                                                                                                                                                                 onlyoffice-mysql-server

The database value has been saved over multiple reboots. I can rerun the database commands and the values will be unchanged. This is the table values after rebooting the monoserve and the server host:

mysql> use onlyoffice;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select * from tenants_quota;
+--------+---------+-------------+---------------+----------------+--------------+----------+-------+-------------+---------+
| tenant | name    | description | max_file_size | max_total_size | active_users | features | price | avangate_id | visible |
+--------+---------+-------------+---------------+----------------+--------------+----------+-------+-------------+---------+
|     -1 | default | NULL        |          5120 |  1099511627776 |        10000 | update   |  0.00 | NULL        |       0 |
|      1 | api     | NULL        |          1024 |  1099511627776 |        10000 | update   |  0.00 | NULL        |       0 |
+--------+---------+-------------+---------------+----------------+--------------+----------+-------+-------------+---------+
2 rows in set (0.00 sec)

Hello @ltcptgeneral
Have you performed any actions with database in the past?
I have deployed fresh Workspace CE, and this table already contains large value for max_file_size:


I was able to upload large .mkv file (4 gb) without additional actions:

Please go to Community server container (docker exec -it ID bash) > nano /var/www/onlyoffice/WebStudio/web.appsettings.config > find this key: <add key="web.max-upload-size" value=.....
What value is set there?

I’ve never changed the db values, but i did change that value as suggested on the original post (but to 5242880000 = 5GB).

<add key="web.max-upload-size" value="5242880000" />

Hello @ltcptgeneral
This case seems unusual since internal tests are OK.
Please go to the host and run df -h, please show the result.
Additionally, please record a video file while you’re reproducing the scenario and collect entire Community server logs folder once it’s reproduced.

df -h:

/dev/rbd1      1007G   37G  919G   4% /
none            492K  4.0K  488K   1% /dev
efivarfs        192K   99K   89K  53% /sys/firmware/efi/efivars
tmpfs            16G     0   16G   0% /dev/shm
tmpfs           6.3G  476K  6.3G   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
overlay        1007G   37G  919G   4% /var/lib/docker/overlay2/a989b598df475bdf62001d6f90ba969230bcb79f43b14cf09a4f68c195e0a919/merged
overlay        1007G   37G  919G   4% /var/lib/docker/overlay2/72a0408364003949fec658e24acf637d0f0b3fd0fdedd7e6f0befe0ad0b01c68/merged
overlay        1007G   37G  919G   4% /var/lib/docker/overlay2/af6b62dadcd013c1aa767f2d89c33bc075d5273a9b23f4a2fe2162e838997dfe/merged
overlay        1007G   37G  919G   4% /var/lib/docker/overlay2/b40769f4c482e90ed716864b0de171fbe54d9acda43f87b42a4685817d3c8cf7/merged
overlay        1007G   37G  919G   4% /var/lib/docker/overlay2/cd71bfdadd10373793448e4131255a1db40bd509394e33cde7f1615e21b91bbf/merged

Video of the scenario (this is after updating the database and web.max-upload-size values):

Log files:

As far as I could tell, there are no errors being produced from this issue.

Thank you @ltcptgeneral
We’re checking the situation.

@ltcptgeneral
I believe we figured out the situation.
Please go back to database and change:
mysql> select * from tenants_quota;

+--------+---------+-------------+---------------+----------------+--------------+----------+-------+-------------+---------+
| tenant | name    | description | max_file_size | max_total_size | active_users | features | price | avangate_id | visible |
+--------+---------+-------------+---------------+----------------+--------------+----------+-------+-------------+---------+
|     -1 | default | NULL        |          5120 |  1099511627776 |        10000 | update   |  0.00 | NULL        |       0 |
|      1 | api     | NULL        |          1024 |  1099511627776 |        10000 | update   |  0.00 | NULL        |       0 |

and change max_file_size to 5120 for tenant = ‘1’ (the second line).
After that go to Community server container and restart Mono service.
Please let us know the result.

I’m away for a couple weeks, will have to try this and update when I get back.

1 Like

Thank you, please keep us posted.

This worked!

1 Like

We’re glad that the situation is resolved. Please feel free to contact us if you face any issues.