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

[Bug]: Data Flushed/Deleted in local Docker setup after restarting the containers #645

Open
2 of 4 tasks
ikharsha opened this issue Nov 15, 2024 · 3 comments
Open
2 of 4 tasks
Labels
bug Something isn't working

Comments

@ikharsha
Copy link

ikharsha commented Nov 15, 2024

What component(s) are affected?

  • Python SDK
  • Opik UI
  • Opik Server
  • Documentation

Opik version

  • Opik version: x.x.x

Describe the problem

While i setup Opik locally and use it ,the Traces ,Logs and all are being stored and shown up in the Dashboard but after stopping the Opik running containers and after restarting them the Data is been Deleted/flushed

please sort this this out is there any command or code predefined to delete them or i need to do some modification to solve this persistent memory issue!!

Reproduction steps

No response

@ikharsha ikharsha added the bug Something isn't working label Nov 15, 2024
@jverre
Copy link
Collaborator

jverre commented Nov 15, 2024

@ikharsha Let me take a look, this shouldn't be the case but we did make some changes to the docker compose deployment recently so will try to reproduce

@jverre
Copy link
Collaborator

jverre commented Nov 15, 2024

@ikharsha I've run the following and wasn't able to reproduce:

cd deployment/docker-compose

# Start Opik
docker compose up -d

# Logged some traces and prompts

# Stopped Opik
docker compose down

# Restarted Opik
docker compose up -d

# -> Data was still available

Can you share a bit more about your setup (Windows vs Mac machine for example) and some code to reproduce using the latest code on the main branch ? The data should definitely be persisted so we might have a bug depending on the setup

@ikharsha
Copy link
Author

ikharsha commented Nov 16, 2024

Hey @jverre, I deployed Opik on an Azure VM instance and can access it through the VM's URL on PORT:5173. I’ve configured the Opik URL the same way on my personal laptop. I’ve logged some traces, and everything is visible on the dashboard, working perfectly.

However, my VM automatically shuts down at midnight (12:00 AM). When I restart the VM in the morning, I manually restart the Opik dependency containers (Redis, MySQL, Clickhouse, backend, frontend) that were stopped due to the system shutdown. But now, I see nothing on my dashboard—everything appears new, and I’ve lost all the traces/logged data.

cd deployment/docker-compose
#Start Opik:
docker compose up -d

#Log some traces and prompts:
#Verified that traces and prompts were visible on the dashboard.
#VM automatically shuts down at midnight (12:00 AM):

#All Opik dependency containers (Redis, MySQL, Clickhouse, backend, frontend) stop due to the system shutdown.
#Restart the VM in the morning:

#Manually restart the containers:

docker start <container-ID1> <container-ID2> <container-ID3> <container-ID4> <container-ID5>

#Dashboard appears empty, and all previously logged traces and data are lost.

I hope this scenario makes sense. Should I run docker compose down to stop the containers before the shutdown and then start them again after the restart? Will this prevent the data loss?

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

No branches or pull requests

2 participants