Skip to content

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

Closed as not planned

Description

@hgoona

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?

Activity

  1. andradei commented on Nov 14, 2023

    @andradei

    @hgoona it's been almost a year. Sometimes air hangs in the air 😄 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.

  2. okseb commented on Jan 17, 2024

    @okseb

    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?

  3. W1M0R commented on Mar 11, 2024

    @W1M0R

    Same issue here.

  4. duizabojul commented on Mar 25, 2024

    @duizabojul

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

  5. dimmerz92 commented on Apr 25, 2024

    @dimmerz92

    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.

  6. andradei commented on Feb 27, 2025

    @andradei

    I just learned CTRL + \ kills air (it causes a ton of goroutine panics) and frees the used port.
    Still not a solution.

  7. github-actions commented on May 21, 2026

    @github-actions

    This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions