Commit 6b2a3d42 authored by Ryan Herbert's avatar Ryan Herbert fix space issues for uploads

Our servers tend to have little space on the filesystem, but mount large
partitions to /mnt for file storage. This was hindering our upload
capabilities due to the creation of temporary files by nginx and uwsgi.
Redirecting these files to /mnt/data/tmp means this problem would only
occur when our main storage becomes limited in available space.

Fixes #2149
parent ae6b02ac
......@@ -80,7 +80,9 @@ server {
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
keepalive_timeout 70;
client_body_temp_path /mnt/data/tmp;
uwsgi_max_temp_file_size 20480m;
uwsgi_temp_path /mnt/data/tmp;
uwsgi_read_timeout 10m;
location / {
......@@ -187,6 +189,7 @@ gid = www-data
cron = 0 0 -1 -1 -1 python $CWD/web2py/ -Q -S welcome -M -R scripts/ -A -o
no-orphans = true
ignore-sigpipe = true
env = TMPDIR=/mnt/data/tmp
" >/etc/uwsgi/web2py.ini
#Create a configuration file for uwsgi in emperor-mode
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment