-
-
Notifications
You must be signed in to change notification settings - Fork 19
Shared Formidable IncomingForm instance fails on concurrent uploads #44
Copy link
Copy link
Open
Labels
Pkg: koa-better-bodyPriority: MediumThis issue may be useful, and needs some attention.This issue may be useful, and needs some attention.Status: AcceptedIt's clear what the subject of the issue is about, and what the resolution should be.It's clear what the subject of the issue is about, and what the resolution should be.Status: AvailableNo one has claimed for resolving this issue. Generally applied to bugs and enhancement issues.No one has claimed for resolving this issue. Generally applied to bugs and enhancement issues.Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.Inconsistencies or issues which will cause an issue or problem for users or implementors.Type: EnhancementMost issues will probably be for additions or changes. Expected that this will result in a PR.Most issues will probably be for additions or changes. Expected that this will result in a PR.
Metadata
Metadata
Assignees
Labels
Pkg: koa-better-bodyPriority: MediumThis issue may be useful, and needs some attention.This issue may be useful, and needs some attention.Status: AcceptedIt's clear what the subject of the issue is about, and what the resolution should be.It's clear what the subject of the issue is about, and what the resolution should be.Status: AvailableNo one has claimed for resolving this issue. Generally applied to bugs and enhancement issues.No one has claimed for resolving this issue. Generally applied to bugs and enhancement issues.Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.Inconsistencies or issues which will cause an issue or problem for users or implementors.Type: EnhancementMost issues will probably be for additions or changes. Expected that this will result in a PR.Most issues will probably be for additions or changes. Expected that this will result in a PR.
Version: 3.0.2
Description: Providing a custom Formidable
IncomingForminstance via theIncomingFormoption on create causes concurrent uploads to put that instance in a bad state. The concurrent uploads usually fail with the following error message. Any further uploads after this failure will not complete until the connection times out.My understanding of Formidable is that the
IncomingForminstance should not be reused across requests. The problematic lines inkoa-better-bodyappear to be here.Steps to reproduce:
Use the example code from the Formidable recipe here: https://github.com/tunnckoCore/koa-better-body/tree/master/recipes/formidable
Use the following to get the server into a failed state:
where
path_to_some_reasonable_sized_fileshould supply something large enough to ensure the uploads are concurrent. In my case it was a file ~ 500kb.After the above command, any further upload will lock until the connection times out. E.g. use the recipe's example
curl: