Skip to content
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

net/http: ParseMultipartForm sometime slow over 30s #57551

Closed
ben-swit opened this issue Jan 3, 2023 · 6 comments
Closed

net/http: ParseMultipartForm sometime slow over 30s #57551

ben-swit opened this issue Jan 3, 2023 · 6 comments
Labels
WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@ben-swit
Copy link

ben-swit commented Jan 3, 2023

What version of Go are you using (go version)?

$ go version
tested in go.1.18 

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

alpine-3.14 in kubernetes

What did you do?

i using gin with http fileserver in production but sometime response delay 30s
So when I tracked it, it was confirmed that it took the longest in ParseMultipartForm.

If 4 requests occur, 3 takes less than 2 seconds and 1 takes 30 seconds
or 3 request takes 30 seconds

What did you expect to see?

constant latency

What did you see instead?

now := time.Now()
if err := ctx.Request.ParseMultipartForm(32 << 20); err != nil {
// rise error
}
fmt.Println(time.Now().Sub(now).String())
@seankhliao
Copy link
Member

seankhliao commented Jan 3, 2023

what sort of requests is it processing?
do you have a full reproducer?

@hopehook hopehook added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Jan 3, 2023
@ben-swit
Copy link
Author

ben-swit commented Jan 4, 2023

@seankhliao request only multipart form data

@seankhliao seankhliao added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Jan 4, 2023
@ben-swit
Copy link
Author

ben-swit commented Jan 5, 2023

related by gin-gonic/gin#1988

@seankhliao seankhliao added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Jan 5, 2023
@ben-swit
Copy link
Author

ben-swit commented Jan 5, 2023

i solved this issue reason by node machine

@ben-swit ben-swit closed this as completed Jan 5, 2023
@wooongchi
Copy link

@ben-swit How did you solve this problem?

@DouFuJuShi
Copy link

How did you solve this problem?

@golang golang locked as off-topic and limited conversation to collaborators Oct 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

5 participants