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

Self hosting problem after rebooting machine #14430

Open
5 tasks done
github-carlos opened this issue Feb 26, 2025 · 1 comment
Open
5 tasks done

Self hosting problem after rebooting machine #14430

github-carlos opened this issue Feb 26, 2025 · 1 comment
Labels
🐞 bug Something isn't working

Comments

@github-carlos
Copy link

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.15.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Configure envs to use external database, redis and storage (S3).
  2. Remove all container's volume
  3. Restart containers

✔️ Expected Behavior

I am hosting Dify on an EC2 instance using Docker Compose and deploying it via a Bitbucket pipeline. In my pipeline, I essentially remove all Dify-related files from the server, redeploy the application, stop the containers, and then start them again.

I've already externalized some environment variables to connect to an external database, S3 storage, and Redis. However, after each redeploy, when I try to perform a retrieval test through the front end, I encounter a "GraphQL schema not found" error. The issue resolves if I deactivate and reactivate the document, but this isn't ideal.

My question is: how can I make this process more reliable so that, even after a redeploy, the system continues to work with the existing data without issues? What might I be overlooking?

❌ Actual Behavior

Some graphql is not created when containers are restarted

Image

Query was not successful! Unexpected status code: 422, with response body: {'error': [{'message': 'no graphql provider present, this is most likely because no schema is present. Import a schema first!'}]}.; Query was not successful! Unexpected status code: 422, with response body: {'error': [{'message': 'no graphql provider present, this is most likely because no schema is present. Import a schema first!'}]}.

@dosubot dosubot bot added the 🐞 bug Something isn't working label Feb 26, 2025
Copy link

dosubot bot commented Feb 26, 2025

I found a similar unsolved discussion titled "Self hosting problem after rebooting machine" on the Dify GitHub repository. You can view it here [1].

Regarding your issue, it seems that the GraphQL schema is not being retained across container restarts. To address this, ensure that your Docker volumes for the database and other services are correctly configured to persist data. Specifically, mark the database volume as external in your docker-compose.yaml file to prevent it from being removed during docker compose down operations [2].

Additionally, verify that your environment variables are correctly set to point to the external services and that these services are accessible and properly configured. This setup should help maintain the GraphQL schema and other data across redeployments.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

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

1 participant