-
-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Since #806 ncps is working well, mostly. Well it's not an issue with ncps itself but other software or hardware around it.
Sometimes when building many packages on a host that uses my ncps server (config) that send many requests to my ncps server, Lix reports various errors and fails. My last 4 attempts of nixpkgs-review pr 494320 failed with these errors:
-
error: unable to download 'https://nix-cache.tchfoo.com/8cw166ccda4wjkw9xmhhshy6lg67iaq8.narinfo': Send failure: Broken pipe (curl error code=35)
-
error: unable to download 'https://nix-cache.tchfoo.com/ccrb9l61i26wjqf0yrkx6r0imayrjlyi.narinfo': HTTP )
response body: <html> <head><title>500 Internal Server Error</title></head> <body> <center><h1>500 Internal Server Error</h1></center> <hr><center>nginx</center> </body> </html>
Removing ncps cache for the above build worked first try: nixpkgs-review pr 494320 --build-args='--substituters "https://cache.nixos.org"'.
My questions are:
- What is the recommended configuration for hosting ncps with nginx? (Should I add some extra nginx config, try angie, try other webservers, move this to a beefier machine/cloud which I don't really want...) Maybe an example config to serve it with a domain would be worth mentioning at https://docs.ncps.dev/user-guide/installation/nixos.
- Can I make the client tolerate/retry these "one-off" errors, should I try other clients? I've had similar issues in the past with Lix.
Edit: the second issue could be solved by bumping some nginx worker connections, I'm not sure how good or bad idea is that. Logs:
Feb 26 12:19:34 raspi5-doboz nginx[204246]: 2026/02/26 12:19:34 [alert] 204246#204246: *110482 512 worker_connections are not enough while connecting to upstream, client: 89.148.88.60, server: nix-cache.tchfoo.com, request: "GET /jwp524w5r58j2w4s7kxhk53cxsv1qzqc.narinfo HTTP/2.0", upstream: "http://[::1]:8501/jwp524w5r58j2w4s7kxhk53cxsv1qzqc.narinfo", host: "nix-cache.tchfoo.com"
Feb 26 12:19:34 raspi5-doboz nginx[204246]: 2026/02/26 12:19:34 [alert] 204246#204246: 512 worker_connections are not enough