-
-
Notifications
You must be signed in to change notification settings - Fork 780
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
Duplicate process after reload #426
Comments
I have the exact same problem. I'm now up to 5 processes that will reload and 4 of them give error due to my api port is already in use. Have anyone else had this and solved it? |
Same here. ChatGPT told me to implement graceful shutdown but it didn't work. There is a high chance that I implemented it wrong, but the know-it-all chatGPT gave me the approval |
Try to change the .air.toml with the following values: kill_delay = "10s" It should work. |
Unfortunately, not quite, I did that, it worked for me only on first time, but will fail eventually:
IE, at I think the root cause is to fix why there are multiple instances running simultaneously. |
Just got into go and air, and this happened to me aswell, logs (http example): __ _ ___
/ /\ | | | |_)
/_/--\ |_| |_| \_ , built with Go
watching .
!exclude tmp
building...
running...
main.go has changed
building...
main.go has changed
running...
main.go has changed
main.go has changed
building...
building...
running...
running...
2023/09/20 18:07:30 listen tcp :8080: bind: address already in use
main.go has changed
building...
main.go has changed
building...
running...
running...
2023/09/20 18:07:36 listen tcp :8080: bind: address already in use |
Code changes under ./cmd are not detected and not reloading
and cd to
./cmd
and runair
with config under./cmd
then it will work, tried changeroot = "."
toroot = "./cmd"
but still not detecting changesThe text was updated successfully, but these errors were encountered: