Increase Nginx upload limit to 100m, improve related docs [#5496].
authorBen Sturmfels <ben@sturm.com.au>
Wed, 13 May 2020 03:22:11 +0000 (13:22 +1000)
committerBen Sturmfels <ben@sturm.com.au>
Wed, 13 May 2020 03:22:11 +0000 (13:22 +1000)
By increasing the limit from 8m to 100m, we should immediately fix initial
problems for people trying to upload audio or video. From there, they can read
the documentation more closely when they try to upload larger files.

docs/source/siteadmin/deploying.rst
docs/source/siteadmin/media-types.rst
docs/source/siteadmin/production-deployments.rst

index e37803252d2c0460b69df360e3e86e57b7462adc..9c88a04d00116700328084070d2cc4acf2e6aed8 100644 (file)
@@ -408,8 +408,11 @@ should be modeled on the following::
      # This is the section you should read
      #####################################
 
-     # Change this to update the upload size limit for your users
-     client_max_body_size 8m;
+     # Change this to allow your users to upload larger files. If
+     # you enable audio or video you will need to increase this. This
+     # is essentially a security setting to prevent *extremely* large
+     # files being uploaded. Example settings include 500m and 1g.
+     client_max_body_size 100m;
 
      # prevent attacks (someone uploading a .txt file that the browser
      # interprets as an HTML file, etc.)
index 225b453a46e456c98f3ce80fad45c18635e9e31f..5944b9b409b8a92c978a8b7ee3a71279336da5c9 100644 (file)
@@ -97,12 +97,6 @@ as whatever GStreamer plugins you want, good/bad/ugly):
     # Fedora and co.
     sudo dnf install gstreamer1-plugins-{base,bad-free,good,ugly-free}
 
-.. note::
-
-   MediaGoblin previously generated spectrograms for uploaded audio. This
-   feature has been removed due to incompatibility with Python 3. We may
-   consider re-adding this feature in the future.
-
 Add ``[[mediagoblin.media_types.audio]]`` under the ``[plugins]`` section in your
 ``mediagoblin.ini`` and update MediaGoblin::
 
@@ -111,6 +105,20 @@ Add ``[[mediagoblin.media_types.audio]]`` under the ``[plugins]`` section in you
 Restart MediaGoblin (and Celery if applicable). You should now be able to upload
 and listen to audio files!
 
+On production deployments, you will need to increase Nginx's
+``client_max_body_size`` to allow larger files to be uploaded, or you'll get a
+"413 Request Entity Too Large" error. See ":ref:`webserver-config`".
+
+Production deployments will also need a separate process to transcode media in
+the background. See ":ref:`systemd-service-files`" and
+":ref:`separate-celery`" sections of this manual.
+
+.. note::
+
+   MediaGoblin previously generated spectrograms for uploaded audio. This
+   feature has been removed due to incompatibility with Python 3. We may
+   consider re-adding this feature in the future.
+
 
 Video
 =====
@@ -141,15 +149,13 @@ Run::
 Restart MediaGoblin (and Celery if applicable). Now you should be able to submit
 videos, and MediaGoblin should transcode them.
 
-.. note::
+On production deployments, you will need to increase Nginx's
+``client_max_body_size`` to allow larger files to be uploaded, or you'll get a
+"413 Request Entity Too Large" error. See ":ref:`webserver-config`".
 
-   You will likely need to increase the ``client_max_body_size`` setting in
-   Nginx to upload larger videos.
-   
-   You almost certainly want to separate Celery from the normal
-   paste process or your users will probably find that their connections
-   time out as the video transcodes.  To set that up, check out the
-   ":doc:`production-deployments`" section of this manual.
+Production deployments will also need a separate process to transcode media in
+the background. To set that up, check out the ":doc:`deploying`" and
+":doc:`production-deployments`" sections of this manual.
 
 
 Raw image
index 055dfa1466f295d760cc9d3713764effeac8f725..02a7bd8f29d0523c8fa3c2bd1fb43515cd610b63 100644 (file)
@@ -106,6 +106,7 @@ system. Similar scripts will be in your system's ``/etc/init.d/``
 or ``/etc/rc.d/`` directory, but the specifics of an init script will vary from
 one distribution to the next.
 
+.. _separate-celery:
 
 Separate celery
 ---------------