413 Request Entity Too Large - How do I increase upload file size or remove upload limiter

Hello,

Describe the problem
I’ve just installed our first LibreTime instance (non-docker) and everything seems to run fine.
When I tried to upload music file over 1mb to the Library I get the below error. I am able to upload file over 1mb.

To reproduce
Log in to the Management Interface
Click “Upload or Drag" files to upload

Expected behavior
An import done successfully

Relevant log output or error messages

413 Request Entity Too Large

413 Request Entity Too Large


nginx/1.18.0 (Ubuntu)

LibreTime version: 3.1.0

Operating system: Ubuntu 20.04.6

Method: Installer script

Thank you.

Yep. This could be caused by different limitations.

In my case, it was nginx.conf that blocked the import. Here’s what I did:

sudo nano -l /etc/nginx/nginx.conf

Paste the code below at line 64 before the closing bracket :

# set client body size to 1000M #
client_max_body_size 1000M;

Restart nginx

sudo systemctl restart nginx

It could also come from your PHP upload_max_filesize :

sudo nano -l /etc/php/7.4/fpm/php.ini

Find and change for :

line 409:
memory_limit = 512M

line 694:
post_max_size = 1000M

line 846:
upload_max_filesize = 500M

Restart Apache

sudo systemctl restart php7.4-fpm.service

Cheers Pal.
It is was the nginx.conf

Thank you

1 Like