File manager - increase upload file size?

Locked
prune
Posts: 85
Joined: Thu 14. Nov 2019, 11:22

File manager - increase upload file size?

Post by prune »

The default is 64M. I dont see any option for it in Admin > Settings > Configuration > Tools > File manager

I already changed User administration > Edit user > Php > upload_max_filesize to 150M but it doesnt affect File manager?

Im trying to upload a 140 mb zip.

Also where are the Php options like composer that you usually can un/check in Cpanel?

Thanks!
User avatar
Alexander
Keyweb AG
Posts: 3810
Joined: Wed 20. Jan 2016, 02:23

Re: File manager - increase upload file size?

Post by Alexander »

Hello,

have a look into the following file, which is responsible for the KeyHelp UI:

Code: Select all

/etc/php/<PHP-VERSION>/fpm/pool.d/keyhelp.conf
After modifying this file, restart the PHP-FPM:

Code: Select all

service php<PHP-VERSION>-fpm restart
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
prune
Posts: 85
Joined: Thu 14. Nov 2019, 11:22

Re: File manager - increase upload file size?

Post by prune »

Thank you I will check this out. Hopefully in future this can be tweaked within admin panel.
prune
Posts: 85
Joined: Thu 14. Nov 2019, 11:22

Re: File manager - increase upload file size?

Post by prune »

I already increase it to 150M but now I get this from Cloudflare. My KH is behind cloudflare

413 Request Entity Too Large

Im upload a 138 mb zip.

php_admin_value[memory_limit] = 128M
php_admin_value[post_max_size] = 150M
php_admin_value[upload_max_filesize] = 150M
php_admin_value[max_execution_time] = 180
php_admin_value[max_input_vars] = 2000
prune
Posts: 85
Joined: Thu 14. Nov 2019, 11:22

Re: File manager - increase upload file size?

Post by prune »

I grey cloud my domain in cloudflare and tried again but now I get

This page isn’t working right now
<mysite> can't currently handle this request.
HTTP ERROR 500

Maybe upload time out? How to increase time out? Modify this max_execution_time ?
prune
Posts: 85
Joined: Thu 14. Nov 2019, 11:22

Re: File manager - increase upload file size?

Post by prune »

Im still geting http error 500, i already disabled the cloudflare cloud for my domain for over 12 hrs now.
prune
Posts: 85
Joined: Thu 14. Nov 2019, 11:22

Re: File manager - increase upload file size?

Post by prune »

When creating new subdomain then creating a directory for it File manager then I upload a zip there, I get this error on 1st try

503 service unavailable
Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

On 2nd try it is a success. Just a zip below 20 mb.
User avatar
chaiavi
Posts: 34
Joined: Wed 22. Apr 2020, 22:02

Re: File manager - increase upload file size?

Post by chaiavi »

I had a problem and although I defined a 500mb upload in the UI, it failed on about 120mb files or larger.

Looking it the logs, it seems that uploading of a single large file in the File manager fails as it tries to allocate all memory for the file.

Which means that even if you can define a max upload of 500mb, in fact it means that 500mb can be uploaded only having multiple files, but for a single file the limit is the max memory for PHP or something like that


I am attaching my log:

Code: Select all

PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 217773032 bytes) in /home/keyhelp/www/keyhelp/pages/user_file_manager.php on line 338
User avatar
Alexander
Keyweb AG
Posts: 3810
Joined: Wed 20. Jan 2016, 02:23

Re: File manager - increase upload file size?

Post by Alexander »

I had a problem and although I defined a 500mb upload in the UI, it failed on about 120mb files or larger.
The value of the specific user is not relevant in this case.
When using the KeyHelp UI, only the settings of the "keyhelp" system user (the one running the KeyHelp UI) are relevant.

Its configuration can only be updated here:

Code: Select all

/etc/php/<PHP-VERSION>/fpm/pool.d/keyhelp.conf
Update these values as you wish.

Code: Select all

php_admin_value[memory_limit] = 128M
php_admin_value[post_max_size] = 70M
php_admin_value[upload_max_filesize] = 64M
Afterwards restart / reload the PHP-FPM daemon.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
User avatar
chaiavi
Posts: 34
Joined: Wed 22. Apr 2020, 22:02

Re: File manager - increase upload file size?

Post by chaiavi »

Thank you very much!
Locked