-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
send() failed (32: Broken pipe) when performing HTTP POST to Immich #77
Comments
Hey 👋🏻 I have setup a similar setup environment and don't see to be experiencing the same issue. I am uploading a 3mb file as per your reddit thread I dont see any errors. Is CrowdSec / AppSec running locally to NPMPlus (on same host to reduce latency)? Could you provide the full nginx configuration that is generated by NPMplus as I am using nginx (since its the same code I dont want to spend time configuring NPMPlus since its the same lua code)
everything seems to be getting processed:
|
Yup, both Crowdsec and NPMPlus are running in docker containers on the same host. Part of the same docker-compose:
Immich is running on the same host as well, as a docker container. The config for that one is very standard with little to no customization. My proxy config in NPMPlus looks like this: Nothing in custom locations, and a regular certbot certificate to force enable HTTPS. My crowdsec.conf file is this:
The two bottom lines are currently commented out to make it work. If I uncomment them, it breaks with the broken pipe error message when uploading anything. |
I don't use Immich myself, but there seems to be an Issue with it, I already have 3 discussions about it with multiple people having the same issues: the issue is always related to appsec and immich and disabling appsec (or changing APPSEC_FAILURE_ACTION to passthrough) fixed it (modsec also needs to be disabled) — sometimes increasing the timeouts also fixed (at least for Nextcloud which had similar issues), so I increased the default timeouts, but the issue still seems to exist on new installations with the new timeouts. |
To hopefully contribute, I started discussion 1241 that @Zoey2936 linked above. It was suggested I post here answering the below questions so here we go: Is the deployment local or remote (VPS)? Local Is the domain being proxied by a CDN like cloudflare? For full transparency I do use a Cloudflare tunnel, but only for external connections. The tunnel isn't involved while on the LAN. Does it happen on upload like the OP or when you said when immich makes a backup? I am the OP in that thread. I believe the single image upload and backup feature are basically the same thing using the same endpoint. The backup feature just does it automatically and in batches. This is what happens when I attempt to upload (or backup) a single photo:
(Domain name changed for privacy and yes, I use a non-typical subnet) Disabling Appsec fixes the issue, albeit with the trade off of reduced security. Thanks. |
Hey, Do you know how big is the body of the request when you get this error ? Currently, the appsec will try to process any body it sees, regardless of the size, which will lead to issues (also tracked here: #71). I haven't performed any real tests to see where the actual limit is currently, but I guess anything over a few hundred MBs will trigger this error. Once #80 is merged (it includes a large refactoring of the code, so we have to wait for it), we plan to add additional configuration on how to handle large bodies (allow to set a maximum body size and whether to drop the request or just analyze the headers when it's over the limit). |
I just met this issue today with my own Ghost blog post editing. appsec will block me from time to time as I was editing posts. No solution found yet but fortunately saw this issue, for post editing I think the body is not huge at all as I just started. |
The photos are a couple of MB each and it does one request per photo, so definitely not in the few hundred MB territory. |
Having the same issue. Issue happens even when inside the LAN, so no cloudflare on anything else involved.
what could be causing the broken pipe between the appsec and the proxy? edit: Initially, the containers were on different docker networks, and communicating via ports exposed to the host.
|
When running Immich (https://github.com/immich-app/immich) behind NPM(plus) and enabling Crowdsec/Appsec, it is not possible to upload files to the server via HTTP POST:
The issue was initially reported at ZoeyVid/NPMplus#1123.
The text was updated successfully, but these errors were encountered: