Nvim
May 9, 2019, 7:29pm
1
I’m trying to reset my ecto db with mix ecto.reset but I get this error,
The database for MusicDB.Repo couldn’t be dropped: ERROR 55006 (object_in_use) database “music_db” is being accessed by other users
There are 10 other sessions using the database.
How do you kill ecto sessions?
How many applications access the database?
It could be a terminal with psql open…
or the server running…
Nvim
May 9, 2019, 7:38pm
3
@kokolegorille I am working locally with one terminal open in Ubuntu 18.04 with PostgreSQL.
Now You know why
Postgresql forbid this while there are open connections.
lpil
May 9, 2019, 7:42pm
5
Judging by the way there are 10 sessions you have another instance of your application running somewhere. You’ll need to shut it down before you can drop the database.
Nvim
May 9, 2019, 7:44pm
6
This could an issue in the future what if 1 user is superuser, and 9 are sudo, superuser must be able to override everybody.
Then the superuser can just kill their connections and prevent login until they are done with what they need to do. ^.^