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

os.Interrupt does not respond to Ctrl+C after fiber get some requests #90

Closed
4 tasks done
boskiv opened this issue Nov 24, 2021 · 3 comments
Closed
4 tasks done
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@boskiv
Copy link
Contributor

boskiv commented Nov 24, 2021

Required check list:

  • I'm gonna mark the checkboxes like this.
  • I didn't find in the repository's issues section similar bug.
  • I understand, this is Open Source and not-for-profit product.
  • This is not about third-party project, framework, package or technology.

My environment:

  • OS (uname -a): Darwin us2-al-004.local 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64 x86_64 (macOS Monterey 12.0.1 (21A559))
  • Golang (go version): go version go1.17.2 darwin/amd64

Describe the bug:

Steps to reproduce the behavior:

  1. Run App with StartServerWithGracefulShutdown
  2. Get few requests
  3. Press Ctrl+C
  4. App does not exit

Expected behavior:

App should respond to Ctrl+C

Screenshots:
Screen Shot 2021-11-24 at 11 52 00

Additional context:
If I run Ctrl+C before any requests are served, it works as expected
Screen Shot 2021-11-24 at 11 52 21

@boskiv boskiv added the bug Something isn't working label Nov 24, 2021
@boskiv
Copy link
Contributor Author

boskiv commented Nov 24, 2021

FYI, this example also has an issue in my env https://github.com/gofiber/recipes/blob/master/graceful-shutdown/main.go

@boskiv
Copy link
Contributor Author

boskiv commented Nov 24, 2021

After some experiments around ab and curl, i have idea that connection is holding by browser. After I close a browser server immediately exit. More then, time is different between firefox and chrome browsers. Firefox closing connection faster.
So I think you can close this issue, because gracefull exit works as expected.

@koddr
Copy link
Member

koddr commented Nov 25, 2021

Hi, @boskiv

Yes it is. Graceful shot down doesn't close connection, if any client idle. If you don't want to, you can switch to dev in your dot env file.

@koddr koddr closed this as completed Nov 25, 2021
@koddr koddr added documentation Improvements or additions to documentation and removed bug Something isn't working labels Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants