vapor/vapor

Unable to shutdown server

nashysolutions opened this issue · 1 comments

Describe the bug

After running 'serve' and testing various endpoints for a few minutes, attempts to stop serving, using ctrl+c, fail.

To Reproduce

Given my Vapor App is named 'App'

  1. clone source to server
  2. swift build --configuration release
  3. move artefact to /var/www
  4. run App serve

Steps to reproduce the behavior:

  1. Use the service by hitting various endpoints from your client for a few minutes.
  2. On your server, hit ctrl+c to stop serving.

Expected behavior

Server stops serving

Environment

.package(url: "git@github.com:vapor/vapor.git", from: "4.90.0"),
.package(url: "git@github.com:pointfreeco/vapor-routing", from: "0.1.3"),
.package(url: "git@github.com:vapor/fluent.git", from: "4.8.0"),
.package(url: "git@github.com:vapor/fluent-postgres-driver.git", from: "2.8.0"),
.package(url: "git@github.com:pointfreeco/swift-dependencies.git", .upToNextMinor(from: "1.0.0")),
.package(url: "git@github.com:codalesce/swift-toolbox.git", .upToNextMinor(from: "1.10.0")),
.package(url: "git@github.com:codalesce/networking.git", .upToNextMinor(from: "1.2.0")),
.package(url: "git@github.com:codalesce/pp-exported-model.git", .upToNextMinor(from: "1.7.0")),
.package(url: "git@github.com:swift-server/webauthn-swift.git", from: "1.0.0-alpha")

Locally

  • Vapor Framework version: 4.90.0
  • Vapor Toolbox version: 18.7.4
  • OS version: macOS 14.1.1

Server (Digital Ocean droplet)

  • Ubuntu 22.04 (LTS) x64
  • 2GB Ram
  • 10GB Disk

Additional context

There is nothing in my code to suggest that there might be an infinite loop taking place. The endpoints I'm testing are simply printing statements to the debugger.

Using systemd instead, which doesn't present any issues.