air icon indicating copy to clipboard operation
air copied to clipboard

Gin Golang server seems to hang after 3 or 4 requests while using Air

Open hgoona opened this issue 2 years ago • 5 comments

I'm new to dev so Im hoping this isn't a installation problem but I'm noticing that my Go server stops responding after 3 or sometimes 4 responses.

I'm on windows, latest version of Go.

I'm building an api on localhost and sending requests through Postman (and double checked the lack of response with Hoppscotch as well). In both situations I noticed the responses from my server stop after 3 or 4 requests; where I then need to Ctrl+C my vscode file, and re-run air.

However, if I use go run . on my code instead of air, i note that my server correctly responds without hanging. Do I have an installation or configuration problem to look for, or is this a bug in Air?

hgoona avatar Oct 10 '22 07:10 hgoona

@hgoona it's been almost a year. Sometimes air hangs in the air :smile: for me too and Ctrl + C doesn't stop it. I have to manually kill it from another terminal with something like kill -9 <pid of air process>.

But after a few instances of this, it "magically" starts working again.

andradei avatar Nov 14 '23 00:11 andradei

I just started using Air in the past 2 days and I'm having this issue as well and it's happening often enough that its very annoying. Are there any workarounds for this?

rowbawts avatar Jan 17 '24 00:01 rowbawts

Same issue here.

W1M0R avatar Mar 11 '24 13:03 W1M0R

Same issue on mac docker with orbstack, can't ctrl C to stop air process

duizabojul avatar Mar 25 '24 19:03 duizabojul

I also occasionally get this issue. If I kill the terminal and restart air, the port is usually still occupied, so I am required to kill the process kill -9 <PID> before starting air again. Otherwise, loving air.

edit: I use echo rather than gin.

dimmerz92 avatar Apr 25 '24 08:04 dimmerz92