List for cgit developers and users
 help / color / mirror / Atom feed
From: alex_y_xu at yahoo.ca (Alex Xu (Hello71))
Subject: Error downloading snapshots from remote sites
Date: Mon, 04 May 2020 09:23:41 -0400	[thread overview]
Message-ID: <1588598577.igqg9k4jc9.none@localhost> (raw)
In-Reply-To: <5ca75484-03df-38f5-f11c-3334e760e45b@marples.name>

Excerpts from Roy Marples's message of May 4, 2020 5:45 am:
> Hi
> 
> I only get this error downloading from a remote VM.
> Another user has reported the error here:
> https://roy.marples.name/archives/dhcpcd-discuss/0002955.html
> 
> Error is a sample error logged by nginx:
> I use uwsgi to proxy the cgi to nginx.
> 
> *248 open() "/var/db/nginx/uwsgi_temp/6/00/0000000006" failed (13: Permission 
> denied) while reading upstream, client: 2001:470:a085:999::80, server: 
> roy.marples.name, request: "GET /cgit/dhcpcd.git/snapshot/master.tar.xz 
> HTTP/1.1", upstream: "uwsgi://unix:/var/run/uwsgi/cgit.sock:", host: 
> "roy.marples.name"
> 
> Otherwise this setup works fine.
> The user uwsgi/cgit runs as owns the directory /var/db/nginx/uwsgi_temp.
> 
> Any pointers on how to fix this?
> 
> Thanks
> 
> Roy
> 

nginx buffers large responses to disk by default. most likely your whole
uwsgi buffering is broken, but you only see it with snapshots because
nginx decides that the response cannot fit into memory. in particular, 
/var/db/nginx needs to be owned by the nginx user (nginx/http/www-data), 
not the uwsgi user.

this behavior can be adjusted with various tuning knobs:
https://nginx.org/en/docs/http/ngx_http_uwsgi_module.html. you may want
to set uwsgi_buffering off. however, this prevents some useful features,
including as I recall output compression. you can also try setting
something like location ^ /snapshot/ { uwsgi_buffering off; }. that
won't fix your temp_path issues though, which you will still have if
someone requests some other large file.


  reply	other threads:[~2020-05-04 13:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04  9:45 roy
2020-05-04 13:23 ` alex_y_xu [this message]
2020-05-04 13:29   ` roy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1588598577.igqg9k4jc9.none@localhost \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).