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

GetPostForm sometime very slow #3440

Closed
ben-swit opened this issue Dec 19, 2022 · 5 comments
Closed

GetPostForm sometime very slow #3440

ben-swit opened this issue Dec 19, 2022 · 5 comments

Comments

@ben-swit
Copy link

ben-swit commented Dec 19, 2022

Description

i used gin by file server when request post usually return in 2s
but sometime slow call ctx.GetPostForm ( latency over 30s )

How to reproduce

package main

import (
	"github.com/gin-gonic/gin"
)

func (r *Router) Handler(ctx *gin.Context) {
                start := time.Now()
		value, ok := ctx.GetPostForm("value")
		if !ok {
                         //fail
  			return
		}

		zap.L().Debug("read finish", zap.Duration("latency", time.Now().Sub(start)))
}

Environment

  • go version: 1.18
  • gin version (or commit ref): 1.8.1
  • operating system: ubuntu kubernetes pod 4C 8GI
@ben-swit
Copy link
Author

it is related by #1988

@ben-swit ben-swit closed this as completed Jan 3, 2023
@ben-swit ben-swit reopened this Jan 3, 2023
@ben-swit
Copy link
Author

ben-swit commented Jan 3, 2023

golang/go#57551

@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
@DouFuJuShi
Copy link

how to resolve?

@ben-swit
Copy link
Author

ben-swit commented Jan 12, 2024

I solved the issue by changing the node machine, but I am still trying to identify the root cause of the problem. Therefore, I suspect the issue may be related to node or network problems.

The cases where issues are expected to arise are presumed to be in the Kubernetes cloud environment. If there are cases where issues are not expected, please leave a comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants