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

Sometimes it took very long until server answer #4148

Open
ignisVeneficus opened this issue Feb 3, 2025 · 1 comment
Open

Sometimes it took very long until server answer #4148

ignisVeneficus opened this issue Feb 3, 2025 · 1 comment

Comments

@ignisVeneficus
Copy link

Sometimes a request not begin response until I hit CTRL+C on console.
Lat time with the root (static page)

[GIN-debug] Listening and serving HTTP on :8888
[GIN] 2025/02/03 - 14:57:01 |←[97;42m 200 ←[0m|     63.3958ms | 192.168.100.124 |←[97;44m GET     ←[0m "/"
[GIN] 2025/02/03 - 14:57:01 |←[90;47m 304 ←[0m|            0s | 192.168.100.124 |←[97;44m GET     ←[0m "/css/main.css"
[GIN] 2025/02/03 - 14:57:01 |←[90;47m 304 ←[0m|            0s | 192.168.100.124 |←[97;44m GET     ←[0m "/css/book.css"
[GIN] 2025/02/03 - 14:57:01 |←[90;47m 304 ←[0m|       528.5µs | 192.168.100.124 |←[97;44m GET     ←[0m "/js/main.js"

After i get quick response.
I use the github.com/gin-contrib/static for the static routing:

	router := gin.Default()
	router.Use(static.Serve("/", static.LocalFile("./web", false)))
	router.Use(static.Serve("/cover", static.LocalFile(config.GetFilesystemConfig().CoverSource, false)))
	router.Use(static.Serve("/books", static.LocalFile(config.GetFilesystemConfig().BookSource, false)))
	router.GET("/api/book", api.GetAllBook)
	router.GET("/api/book/:id", api.GetBook)

How can I turn on the detailed logging, or how can I avoid/solve the problem?

Thanx
Ignis

@hubeoo
Copy link

hubeoo commented Feb 27, 2025

Please submit a minimum demo for other developers to repeat the problem

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