air-verse / air

☁️ Live reload for Go apps
GNU General Public License v3.0
18.32k stars 815 forks source link

Issue with air just hanging after awhile; cant ctrl+c process [WSL] (I think its the proxy setting) #626

Open ericarthurc opened 4 months ago

ericarthurc commented 4 months ago

image

After awhile, and not very long, air will just hang and I can't ctrl+c the process

My .toml file

[build]
args_bin = []
bin = "./tmp/main"
cmd = "go build -o ./tmp/main ./cmd/pheynnx/main.go"
delay = 1000
exclude_dir = ["assets", "tmp", "vendor", "testdata", "web/source", "build"]
exclude_file = []
exclude_regex = ["_test.go", ".*_templ.go"]
exclude_unchanged = false
follow_symlink = false
full_bin = ""
include_dir = []
include_ext = ["go", "tpl", "tmpl", "templ", "html", "css"]
include_file = []
kill_delay = "0s"
log = "build-errors.log"
poll = false
poll_interval = 0
post_cmd = []
pre_cmd = []
rerun = false
rerun_delay = 500
send_interrupt = false
stop_on_error = false

[proxy]
app_port = 9000
enabled = true
proxy_port = 9001

I even start putting my sass watcher in its own terminal, and did any templ generation manually in its own terminal. So air is running all in its own process and just executing the go binary

The process will get stuck and I have to manually kill it too image

It seems to run okay and not freeze when I turn off the proxy setting; so something with the proxy over WSL

JappeHallunken commented 4 months ago

I have the same problem, I use VScode to connect via SSH to a Rasperry Pi 4 host. I have this with turned-off and turned-on proxy settings. A plain kill does not work either, I have to use kill -9 PID to stop it.

hunter101 commented 3 months ago

@pheynnx I have 100% the exact same setup and issue running Debian on WSL2. A litle work around that makes it quicker to reload rather than having to kill the process is hitting CTRL \ when it hangs rather than the usual CTRL X which like you say doesn't work. Still frustrating, but makes life a little bit more bearable.

ericarthurc commented 3 months ago

@pheynnx I have 100% the exact same setup and issue running Debian on WSL2. A litle work around that makes it quicker to reload rather than having to kill the process is hitting CTRL \ when it hangs rather than the usual CTRL X which like you say doesn't work. Still frustrating, but makes life a little bit more bearable.

Oh interesting, I didn't know about CTRL \ Thank you!