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

Postgres service is not properly stopped #2403

Open
on3iro opened this issue Nov 3, 2024 · 5 comments
Open

Postgres service is not properly stopped #2403

on3iro opened this issue Nov 3, 2024 · 5 comments
Labels
bug Something isn't working triage Issue needs triage

Comments

@on3iro
Copy link

on3iro commented Nov 3, 2024

What happened?

When using the postgres plugin and running devbox services stop, devbox signals, that postgres has been shutdown, and also devbox services ls shows no running service. However postgres is still active as a process. Meaning I still can connect to the postgres instance via e.g. psql and it also shows up with the devbox-path when running ps aux | grep postgres.

Steps to reproduce

  1. devbox services start
  2. devbox services stop
  3. devbox services ls
  4. ps aux | grep postgres

Command

services

devbox.json

{
    "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.13.4/.schema/devbox.schema.json",
    "packages": [
      "just@1.36.0",
      "go@1.22.0",
      "templ@0.2.778",
      "dbmate@2.21.0",
      "postgresql@16.4",
      "air@1.61.1",
      "tailwindcss@3.4.14"
    ],
    "env_from": ".env",
    "shell": {
      "init_hook": [
        "export DATABASE_URL=\"postgres://${PGUSER}:${PGPASSWORD}@localhost:${PGPORT}/${PGDATABASE}?sslmode=disable\""
      ],
      "scripts": {
        "initDevDb": "./scripts/init_dev_database.sh",
        "test": [
          "echo \"Error: no test specified\" && exit 1"
        ]
      }
    }
  }

Devbox version

0.13.4

Nix version

nix (Nix) 2.24.9

What system does this bug occur on?

macOS (Apple Silicon)

Debug logs

No response

@on3iro on3iro added bug Something isn't working triage Issue needs triage labels Nov 3, 2024
@on3iro
Copy link
Author

on3iro commented Nov 3, 2024

Just realized that there are newer devbox versions and that there was a devbox-compose rollback in 0.13.5 - I have installed from nixpkgs-unstable and neither 0.13.5 nor 0.13.6 seem to be available, yet.

@DerArkeN
Copy link
Contributor

DerArkeN commented Nov 6, 2024

You can run devbox version update to update to the newest devbox version.

@on3iro
Copy link
Author

on3iro commented Nov 8, 2024

@DerArkeN when running this with the nix version, it says that I am already at the newest version. (but thanks anyway)

@DerArkeN
Copy link
Contributor

DerArkeN commented Nov 9, 2024

Interesting, I am using the same nix version and don't have a problem updating to the newest version... Maybe try reinstalling devbox if the issue persists?

@idabmat
Copy link

idabmat commented Nov 10, 2024

I've been hit by this as well. The workaround for now is to manually issue pg_ctl stop -m fast in another shell while devbox is stuck stopping services.

I'm also stuck on 0.13.4 while the new version of devbox hasn't made it to nixpkgs. NixOS/nixpkgs#353171 seems like that should happen in a few days. Will test again on 0.13.6 when it lands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Issue needs triage
Development

No branches or pull requests

3 participants