how to adjust the max size for upload file in cms,

1,390 views
Skip to first unread message

龙方哲

unread,
Mar 16, 2014, 6:54:37 AM3/16/14
to edx-...@googlegroups.com
I try to upload a mp4 file ,which is 36M,and get failed.

the nginx setting of cms is 100M,
only the devpi's setting is 30M,

then how to change the cms's upload file size

the following is get by grep "client_max_body_size"

sites-available/forum:  client_max_body_size 1M;
sites-available/lms:  client_max_body_size 4M;
sites-available/ora:    client_max_body_size 75K;
sites-available/cms:  client_max_body_size 100M;
 

Jay Zoldak

unread,
Mar 16, 2014, 10:08:17 AM3/16/14
to edx-code
On Sun, Mar 16, 2014 at 6:54 AM, 龙方哲 <lg2...@gmail.com> wrote:
I try to upload a mp4 file ,which is 36M,and get failed.

the nginx setting of cms is 100M,
only the devpi's setting is 30M,

then how to change the cms's upload file size



The maximum size of uploads is intentionally limited, as the files are stored in gridFS. 
Serving a 36M .mp4 file will result in poor server performance.
Instead you should serve them from somewhere else such as Amazon s3 buckets.


-- JZ

Chris Dodge

unread,
Mar 16, 2014, 12:39:50 PM3/16/14
to edx-...@googlegroups.com
I just wanted to reinforce Jay's suggestion. The files & assets where designed for small assets in mind (small images embedded in HTML, etc.). It should not be used to serve up large media assets such as video. As Jay suggests, you should use S3 or some other similar file server.

We'll likely add additional constraints on upload sizes soon to prevent Open edX users to get themselves into performance problems as serving up large files from gunicorn/Django/GridFS will have severe performance impact.

There's also been some talk into making the Files and Assets feature in Studio more flexible in where it puts assets, but that work is still to be defined and scheduled.

Jane Manning

unread,
Mar 16, 2014, 1:32:17 PM3/16/14
to Chris Dodge, edx-code
As an additional reason not to upload large files into "files and assets", those files are included in the tarball generated when you create an xml export of a course.  If you use platform features that require you to export/import your course (there are many such features, so this is a common workflow step), it's convenient to have a small export that downloads/uploads quickly.

Jane
Reply all
Reply to author
Forward
0 new messages