-
Notifications
You must be signed in to change notification settings - Fork 68
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
Deploying with Amnesia on prod #92
Comments
Are any tables available? if not you can console_clean and schema destroy schema create, make sure mount points exist. Amnesia.info(:all) |
@noizu Yes, tables do exist. I have |
You can get into a weird state with schema sometimes where bags and certain disk based ones will throw up on you. I usually just do console clean and recover that way. for extreme scenarios I sometime use this but most likely if you don't have existing critical data destroying the schema or the table and recreating after checking config should help. I haven't run this in quite a while not sure if the current version is complete so oyu'd need to get into the mnesia undocumented weeds to run this.
|
@noizu I ran your code but it had the same behavior. Then I created a release myself and consoled
I commented the |
If you're using distillery start with console_clean if you're using mix release you can edit the release bin/proj-name file like below to start an instance with out loading applications and then service commands (or run them directly with eval if using mix release.) I use distillery so not sure if that would be an identical experience. The tables are owned by a different node it looks like. you can do TableName.info(:all) to view the internal status and where it thinks it belongs. if they are created against a different node name that would cause issues. |
running db nodes = [client_api@localhost] |
@noizu I faced a problem similar to what user @ak-iz talked about. I followed the advice given by you, and it helped me understand the issue but after On a side note, I have another question because I'm a bit confused about something. Here's what's going on: When I use the command 'mix release', it makes a file called 'bin/<project_name>'. This file has a function called 'start' but doesn't have 'start_clean'. Later, I run a script in Docker. I want to know how I can set things up so that when I run the Docker script, I don't need to manually add 'start_clean' to that file. Can you help me with this as well? |
@zohaib-shamshad @noizu Yeah, same issue here. Running |
I have implemented Amnesia on my existing project. It works fine on local env but not on prod. I am deploying it using
mix release
through docker/kubernetes.This is what I have put inside
config.exs
:I run
mix amnesia.create -d Database --disk!
through docker script but then I am not sure where to put or how the database disks are formed. And it is also evident from the error I am getting when I run the server, it crashes:Any help on this?
The text was updated successfully, but these errors were encountered: