docker-redmine
docker-redmine copied to clipboard
Can't download large files
Hi everyone, thanks a bunch for this project! I've been using Redmine with the provided docker-compose.yml for a few months now. I'm on 5.0.5 and it's all working fine, however, I noticed I can upload large files by changing NGINX_MAX_UPLOAD_SIZE but I can't download them. It fails midway.
My nginx reverse proxy gets the error upstream prematurely closed connection while reading upstream
so I believe the error might come from nginx or unicorn timeouts inside the docker.
Here's my environment config (minus sensitive settings)
postgresql:
image: sameersbn/postgresql:9.6-4
restart: unless-stopped
container_name: redmine-postgresql
ports:
- "5484:5432"
redmine:
build: ./
image: sameersbn/redmine:5.0.5
restart: unless-stopped
container_name: redmine
depends_on:
- postgresql
ports:
- "4000:80"
volumes:
- /srv/docker/redmine/redmine:/home/redmine/data
- /srv/docker/redmine/redmine-logs:/var/log/redmine
environment:
- REDMINE_PORT=4000
- REDMINE_HTTPS=true
- REDMINE_RELATIVE_URL_ROOT=
- REDMINE_SECRET_TOKEN=
- REDMINE_SUDO_MODE_ENABLED=false
- REDMINE_SUDO_MODE_TIMEOUT=15
- REDMINE_CONCURRENT_UPLOADS=2
- REDMINE_BACKUP_SCHEDULE=
- REDMINE_BACKUP_EXPIRY=
- REDMINE_BACKUP_TIME=
- NGINX_MAX_UPLOAD_SIZE=4G
- UNICORN_TIMEOUT = 600
I've changed all timeouts on my nginx reverse proxy to 600s so I don't think that's the cause.
nginx and unicorn logs on /srv/docker/redmine/redmine-logs/ don't provide any clues. Doing docker logs redmine --follow
also doesn't show any errors. I don't know what else I should check to troubleshoot this
I'm think the issue stems from nginx timeouts because I had similar problems on other projects with redmine installed manually. However, the logs don't show anything. Is there a way I can troubleshoot this better and/or change nginx timeouts if at all possible?
Thank you
Note the config for the internal nginx config can be found here: https://github.com/sameersbn/docker-redmine/blob/master/assets/runtime/config/nginx/redmine
If you want to try modifying it, you can volume mount over it.
- ./config/nginx/redmine:/etc/docker-redmine/runtime/config/nginx/redmine:ro
And you can reload just nginx
docker-compose exec -T redmine nginx -s reload
I've changed all timeouts on my nginx reverse proxy
Do you get the same timeout if you try downloading the file going around your reverse proxy?
I can't go around my reverse proxy as this server is being directly served by another machine.
Mounting over it looks like the ticket, but proxy_read_timeout
and proxy_connect_timeout
are already fairly generous with 300s. My assumption was wrong. I'll have to look for another cause. I'll keep it posted here if I happen to find out
Nevertheless thanks. I'm not well versed with docker and that technique will help me in the future
I did just try to upload then download a 3.4GB iso on a fresh repo and it downloaded without issue. Though it was all run locally on my machine so ideal case networking, but atleasts its possible.
Closing