Sucessful upload through round cube w/ 10MB file, then failed attempt with 650MB

Roundcube is using PHP, right? The default php.ini on my box is set for a upload_max_filesize of 2M, so since Roundcube is reading that it’s max file size for upload is 16MB, I’m guessing somewhere there’s an .htaccess file that’s overriding it.

Edit, phpinfo in the roundcube directory shows the same:

So I think as @openletter mentions, there’s two things that are restricting that file size.

The error you’re seeing is hitting the nginx limit, but then if you resolve that, you’re still going to have to tweak the PHP limit.

@blinkingline The .htaccess file as I am aware is a feature of Apache, which is not a part of MiaB.

The limit of 16G is somewhere in the neighborhood of 16GB.

But as I pointed out above, nginx is configured for 128MB, and the error statement matches what the nginx documentation states would be the error.

This is what I see on my install and I have not modified any of these files:

$ grep -E 'upload_max_filesize|post_max_size' /etc/php/7.2/fpm/php.ini
;post_max_size = 8M
post_max_size=16G
;upload_max_filesize = 2M
upload_max_filesize=16G

DOH, you’re right re: Apache v nginx. I was a knucklehead. And I clearly misread the default php.ini config, too!

The only other thing I’d consider is if you have too big an attachment, many mail services will reject the delivery. Most have a limit of sending attachments of 25MB - They’re unlikely to accept a 650MB file.

Tim

You would have had to read the user’s previous topic to know the goal is importing emails from a different provider.

my mistake, I’m sorry!

1 Like

After some experimenting this seems to be the case. However, I can’t confirm if this only applies to uncompressed or zip as well.

-Jeremy

Alright, looks like you can upload pas 128MB if compressed into a zip, I guess, however much your cpu can crunch numbers, and depending on the acceptable formatting of the compressed archive.

Do you mean you can compress a file larger than 128MB such that the compressed file is under 128MB, so it can be uploaded? Because the limit in nginx should not allow any request body over 128MB, no matter the filetype.

As long as you upload a supported file, zip or otherwise equal to or less than 128MB, it seems to be okay with it.

I am trying to use this feature too.

I did changed the nginx.conf with below configuration but still I cannot import large mbox file.
client_max_body_size 16G;
client_body_timeout 120s;

I am trying with mbox file of 7.5G

How can this works ?

What is the error you receive when trying to upload?

it doesn’t gives any error on user interface, just the dialog saying “importing” disappear after a bit…

in the web console tho I still receive errors
Uncaught type error : " ". this is undefined

if the process is still going the user as no clue about it and will likely refresh or close tab.
I changed the client_body_timeout to 1200s as well

Check /var/log/nginx/access.log and error.log.

Are you importing from another mail server? Is something like imapsync and option for you?

Also, because I haven’t experimented with this, you may need to adjust keepalive timeout which is located right under the http block configurations.

thanks for your help.

I don’t see any errors in access.log or error.log of nginx
The POST command seems to be running for ever on client side without no way to follow if failed or still running.
On server side I can the POST in acces.log and no errors about it in error.log

No imapsync is not option since this shall be able to be done by any non-technical user without installing or using any third-party software.

I am gonna look about this keepalive timeout param…

What is the expected time for the upload to complete?

The client_max_body_size directive is available to be configured under every domain and subdomain in /etc/nginx/conf.d/local.conf. Did you check to make sure you configured in the correct server block?

I have no clue on the expected time for the upload to complete.
How would I know/calculate that ?
I guess it is highly depending on the user bandwidth capacity right.

yep I got the right domain because if don’t modify those parameters I get the error like in the screenshot of the very message of this conversation…

I cannot find the keepalive parameter you mention, neither visually neither by grep

sudo cat /etc/nginx/conf.d/local.conf | grep keepalive

I do find a param fastcgi_read_timeout at 630 tho