#283 A file this large would exceed your user quota of 50000000 bytes.

クローズ
2 年 前Gijs によって開かれました · 8 コメント
Gijs2 年 前 にコメントしました

I am trying to attach a 8.0 k image to a post, but I get:

A file this large would exceed your user quota of 50000000 bytes.

I've been getting these for a while, actually.

What are my options? Delete earlier post with images? tell mariadb to give me more room?

I am trying to attach a 8.0 k image to a post, but I get: A file this large would exceed your user quota of 50000000 bytes. I've been getting these for a while, actually. What are my options? Delete earlier post with images? tell mariadb to give me more room?
aab2 年 前 にコメントしました
You can change your quota, it depends on php. It is documented in https://notabug.org/diogo/gnu-social/src/master/DOCUMENTATION/SYSTEM_ADMINISTRATORS/CONFIGURE.md#attachments
Gijs2 年 前 にコメントしました
ポスター

Thanks Aab!

Related? Or not?

I just looked at the files in my/the gnusocial/file folder. There are 12,000 files, and then even more (30k) in avatar and another 4300 in thumb. And the dates on those files goes back to when I started my instance.

Do I need to clean this up? I randomly looked at 3 files, and it's not images I recall posting, or seeing...

Thanks Aab! Related? Or not? I just looked at the files in my/the gnusocial/file folder. There are 12,000 files, and then even more (30k) in avatar and another 4300 in thumb. And the dates on those files goes back to when I started my instance. Do I need to clean this up? I randomly looked at 3 files, and it's not images I recall posting, or seeing...
aab2 年 前 にコメントしました

As long as you have free space, it is not an issue ;)

Anyway, if you want to clean, have a look in the "scripts" folder of StoreRemoteMedia plugin.

As long as you have free space, it is not an issue ;) Anyway, if you want to clean, have a look in the "scripts" folder of StoreRemoteMedia plugin.
Gijs2 年 前 にコメントしました
ポスター

cd ../plugins/StoreRemoteMedia/ php deleteRemoteMedia.php --all -l20220501

removes loads of files in file/thumb (reduces from 41Mb to 14Mb). But I still am not allowed to post: A file this large would ex .... error

So this delete script is not a way to solve the user quota?

I see the default is in lib/util/default.php

cd ../plugins/StoreRemoteMedia/ php deleteRemoteMedia.php --all -l20220501 removes loads of files in file/thumb (reduces from 41Mb to 14Mb). But I still am not allowed to post: A file this large would ex .... error So this delete script is not a way to solve the user quota? I see the default is in lib/util/default.php
aab2 年 前 にコメントしました

Sorry, maybe my answer was not clear. No, the amount of files you have, unless you are running out of space, has nothing to do with your quota. Please, check the link I sent before in order to configure your quotas.

Sorry, maybe my answer was not clear. No, the amount of files you have, unless you are running out of space, has nothing to do with your quota. Please, check the link I sent before in order to configure your quotas.
Gijs2 年 前 にコメントしました
ポスター

Hello Aab!

Thanks very much for your answers (and patience). I am assuming the directory 'files' is where I should see all of the 50Mb of files that I apparently uploaded so far?

I can increase the user quota, but I should also be able to 'simply' delete the oldest or biggest files, or?

Hello Aab! Thanks very much for your answers (and patience). I am assuming the directory 'files' is where I should see all of the 50Mb of files that I apparently uploaded so far? I can increase the user quota, but I should also be able to 'simply' delete the oldest or biggest files, or?
aab2 年 前 にコメントしました

No problem :)

Fron the link above:

  • file_quota: maximum size for a single file upload in bytes. A user can send any amount of notices with attachments as long as each attachment is smaller than file_quota. Defaults to PHP's configured upload limit.

  • user_quota: total size in bytes a user can store on this server. Each user can store any number of files as long as their total size does not exceed the user_quota.

  • monthly_quota: total size permitted in the current month. This is the total size in bytes that a user can upload each month.

So, simply deleting some files is not going to help you if you've exceeded your file quota (which is what "A file this large would exceed your user quota of..." suggests).

No problem :) Fron the link above: - file_quota: maximum size for a single file upload in bytes. A user can send any amount of notices with attachments as long as each attachment is smaller than file_quota. Defaults to PHP's configured upload limit. - user_quota: total size in bytes a user can store on this server. Each user can store any number of files as long as their total size does not exceed the user_quota. - monthly_quota: total size permitted in the current month. This is the total size in bytes that a user can upload each month. So, simply deleting some files is not going to help you if you've exceeded your file quota (which is what "A file this large would exceed your user quota of..." suggests).
senooken2 年 前 にコメントしました

@Gijs Hi. I have same problem.

This error is print from classes/File.php on line 260 nearby. Size is counted by following SQL (profile_id is user id).

select sum(size) as total from file
  inner join file_to_post on file_to_post.file_id = file.id inner join notice on file_to_post.post_id = notice.id
  where profile_id = 1 and filename is null and file.url is not null

In my case, this printed 221227041=221 MB. It seems this size counts thumbnail (file/thumb).

So I appended following in config.php. I solved this error.

$config['attachments']['user_quota'] = 300*1000*1000;
$config['thumbnail']['maxsize'] = 0;

$config['thumbnail']['maxsize'] = 0; prevents generating thumbnail. If this config is removed, thumbnail is generated since even posted attachment!

If there is this config, raw attachment is shown with post instead of thumbnail. I think it is no problem.

I think this config is required for saving disk space.

@Gijs Hi. I have same problem. This error is print from `classes/File.php` on line 260 nearby. Size is counted by following SQL (profile_id is user id). ``` select sum(size) as total from file inner join file_to_post on file_to_post.file_id = file.id inner join notice on file_to_post.post_id = notice.id where profile_id = 1 and filename is null and file.url is not null ``` In my case, this printed 221227041=221 MB. It seems this size counts thumbnail (file/thumb). So I appended following in config.php. I solved this error. ``` $config['attachments']['user_quota'] = 300*1000*1000; $config['thumbnail']['maxsize'] = 0; ``` `$config['thumbnail']['maxsize'] = 0;` prevents generating thumbnail. If this config is removed, thumbnail is generated since even posted attachment! If there is this config, raw attachment is shown with post instead of thumbnail. I think it is no problem. I think this config is required for saving disk space.
diogo 2 年 前 に閉じられました
会話に参加するには サインイン してください。
マイルストーンなし
担当者なし
3 参加者
読み込み中…
キャンセル
保存
まだコンテンツがありません