Dify FAQ

Updated at:
Copy as MD

This topic answers common questions about using Dify in AI-Native Database Service and provides solutions. It covers deployment, resource configuration, model management, performance optimization, and billing.

Deployment

Q: My Dify deployment fails with an insufficient resources error. What should I do?

A: Check the following items:

  • Verify that the zone in the current region has sufficient compute resources. You can view resource usage in the AI-Native Database Service console.

  • Check whether your account has reached its resource quota limit. If you need a higher quota, submit a ticket.

  • Try deploying in a different zone.


Q: My Dify deployment has been in the "Creating" state for a long time. What should I do?

A: The deployment process typically takes 5 to 10 minutes. If it has not completed after 15 minutes, perform the following steps:

  1. Check the deployment logs in the console for error messages.

  2. Verify that the network connection is normal and that the VPC and security group are configured correctly.

  3. If the issue persists, release the current instance and create a new one.


Q: Which regions does Dify support?

A: For the list of supported regions, see the region selector in the AI-Native Database Service console. We recommend that you select a region closest to your business to minimize network latency.

Resource configuration

Q: How do I select the right specifications for my Dify instance?

A: The specifications depend on your business requirements:

  • Development and testing: Select an entry-level specification. This is suitable for functional verification with a small number of users.

  • Production environments: Select a standard or higher specification to ensure sufficient concurrency handling and service stability.


Q: Can I change the specifications of a Dify instance?

A: Yes. You can upgrade or downgrade the specifications of an existing Dify instance in the AI-Native Database Service console. Specification changes may cause a brief service interruption. We recommend that you perform this operation during off-peak hours.


Q: What should I do if my Dify instance runs out of storage space?

A: You can resolve insufficient storage space in the following ways:

  • Expand the storage space in the console.

  • Clean up knowledge base data and conversation history that are no longer in use.

  • Optimize the document chunking strategy for your knowledge base to reduce redundant data.

Model configuration

Q: How do I configure a large language model (LLM) in Dify?

A: Add the API key of the target model in the Dify model provider settings. Dify supports multiple mainstream LLMs, including Tongyi Qianwen, OpenAI, and Anthropic. Perform the following steps:

  1. Log on to the Dify platform and go to Settings > Model Provider.

  2. Select the target model provider and enter the API key.

  3. Verify that the connection is successful and save the configuration.


Q: What should I do if a model call times out or returns an error?

A: Check the following potential causes:

  • Verify that the model API key is valid and has not expired.

  • Check the network connection to ensure that the Dify instance can access the API endpoint of the model service.

  • Check whether the model provider has a service exception or rate limiting. Consider reducing the call frequency.

  • Verify that the request parameters do not exceed the maximum token limit of the model.

Performance optimization

Q: My Dify application responds slowly. How can I optimize performance?

A: You can optimize response speed from the following aspects:

  • Model selection: Choose a model with faster inference speed without significantly affecting the quality of results.

  • Knowledge base optimization: Streamline the knowledge base content and optimize the document chunk size and retrieval strategy.

  • Prompt optimization: Simplify system prompts and remove unnecessary context information.

  • Instance specifications: If the concurrency volume is high, upgrade the instance specifications.


Q: What should I do if knowledge base retrieval results are poor?

A: Consider the following optimizations:

  • Adjust the document chunk size. A chunk size of 300 to 500 characters is generally recommended.

  • Optimize the retrieval mode. Choose semantic search, full-text search, or hybrid search based on your scenario.

  • Improve document quality. Ensure that the uploaded documents have accurate content and a clear structure.

Billing

Q: How is a Dify instance billed?

A: The cost of a Dify instance includes compute resource fees and storage fees. Two billing methods are supported: subscription and pay-as-you-go. For detailed pricing, see the pricing page of AI-Native Database Service.

Note

API fees incurred by model calls are billed separately by the respective model provider and are not included in the Dify instance fees.


Q: Does billing continue after I release a Dify instance?

A: Pay-as-you-go instances stop incurring charges immediately after they are released. For subscription instances, the remaining subscription period is not refunded after release. We recommend that you evaluate whether to renew the subscription before it expires.


Q: Does the Dify instance support the No Fees for Stopped Instances feature?

A: Pay-as-you-go instances support the No Fees for Stopped Instances feature. When an instance is stopped, only storage fees are charged. Compute resource fees are not incurred. You can manually stop an instance in the console.