Details
- Reviewers
amckinley - Maniphest Tasks
- T13008: Process slot exhaustion in Phacility web tier
- Commits
- rPHU260dcbd6b093: Stream "multipart/form-data" file uploads to disk
See next diff; uploaded files using a vanilla file upload with enable_post_data_reading off.
Diff Detail
- Repository
- rPHU libphutil
- Branch
- post3
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 18669 Build 25149: Run Core Tests Build 25148: arc lint + arc unit
Event Timeline
Do we currently write uploads to disk temporarily? I guess rate limiting will prevent this, but I'm worried this opens ourselves up to a DoS by filling disks (especially if there's a problem with S3 or whatever persistence layer that could cause these files to accumulate).
Yeah, the default behavior for PHP is to write multipart/form-data uploads to tempfiles on disk.
We could theoretically stream these directly into S3, but that's another good chunk of work.
If we ran into issues with this, we could attach dedicated volumes to web as a buffer, or put more rate limiting in place, or whatever else, but I think the risk of this is small, and it's fairly minor if /tmp fills up on web nodes. (See also T12857.)