Closed dcieslak19973 closed 2 weeks ago
Hi @dcieslak19973, do you have more than one pod trying to read from the DB? I noticed you're using ReadWriteMany
which I've never personally tested. Also, do you run into the same issue if you set accessMode: ReadWriteOnce
?
Currently, I only have 1 pod running. I chose ReadWriteMany to future-proof a state where I need to run multiple pods. I'll try setting it to ReadWriteOnce and report back positive/negative results when I have them
It also fails (same message about the database lock) with a RWO volume claim
@dcieslak19973 I haven't been able to replicate this, but I also haven't used the azurefile
storage class before. I was able to find a similar issue here, perhaps you could see if any of the solutions outlined here help you solve it: https://github.com/kubernetes/kubernetes/issues/59755
My next recommendation would be to use an external database (like a separate Postgres instance) to host your database instead to hopefully work around this issue. Let me know what you end up doing, thanks!
How to modify the PVC mount path for the Pipelines server?
Currently, when persistence.enabled is set to true, the PVC (Persistent Volume Claim) is mounted at /app/backend/data. However, should it be mounted at /app/pipelines instead? Which path is correct?
@0xThresh - I will see if that potential workaround for AzureFiles is an option.
As far as using an external database, the documentation seems a bit thin or unclear in this regard. Is simply configuring DATABASE_URL ( https://docs.openwebui.com/getting-started/advanced-topics/env-configuration#database_url ) sufficient?
Yes, you'd set your database connection string in that variable and Open WebUI will connect to that DB instead. Note that it will not automatically migrate existing data though, so you'll either have to copy your data over, or just start with a fresh install that uses the external DB.
Thanks @0xThresh . I've gone the Postgres route for now and can confirm chat history persists across pod restarts. In our dev environment, I don't have OIDC auth enabled, and saw that user accounts persisted to Postgres. In our Prod env, we are using OIDC for auth, so presumably the user accounts table in postgres will be empty?
I would assume that table would still map some info to the SSO user, such as their chat IDs, but I'm not intimately familiar with the DB schema. I asked others in Discord and will report back once I hear more.
Since the issue seemed external to Open WebUI/ the Helm chart and more specific to the AzureFile storage class, I'm going to close this out now. Thanks for reporting your issue, please feel free to open another issue if you see other weird behavior in the future!
@dcieslak19973 that DB should have users with an oauth_sub column mapped to their federated ID. Another contributor sent this as an example:
i am using external postgres to persist data but it does not seam to persist files uploaded to knowledge base but facing similar issue with AzureFile storage
what are the other option we have to persist files uploaded by users
I'm trying to deploy OpenWebUI via the Helm Chart with persistence enabled. However, when I do so, the pod won't start, reporting:
Here is the configuration for persistence in my values.yaml
I do not have any mounts specified
Thanks!