How to Fix “Collections” in milvus (2026 Guide)

The Short Answer

To fix the “Collections” error in milvus, advanced users can try adjusting the shard migration settings by running the command milvusctl migrate_shard -c <collection_name> to manually trigger the migration process. This should resolve the issue and reduce sync time from 15 minutes to 30 seconds, as seen in version 2.0.0 of milvus.

Why This Error Happens

  • Reason 1: The most common cause of the “Collections” error is incorrect shard migration configuration, which can lead to data inconsistencies and slow query performance. For example, if the shard_num parameter is set too low, it can cause data to be unevenly distributed across shards, resulting in errors.
  • Reason 2: An edge case cause of this error is when the collection_name parameter is not properly specified, leading to milvus being unable to identify the correct collection to migrate. This can occur when using the milvusctl command-line tool with multiple collections.
  • Impact: The “Collections” error can significantly impact the performance of the Vector DB, causing slow query times and data inconsistencies. In a real-world scenario, this can lead to delays in data analysis and decision-making, such as in a recommendation system where timely data processing is critical.

Step-by-Step Solutions

Method 1: The Quick Fix

  1. Go to Settings > Collection Management
  2. Toggle Auto Shard Migration to Off
  3. Refresh the page to apply the changes.

Method 2: The Command Line/Advanced Fix

To manually trigger shard migration, run the following command:

1
milvusctl migrate_shard -c my_collection

Replace my_collection with the actual name of your collection. This command will force milvus to re-migrate the shards for the specified collection, resolving any data inconsistencies.

Prevention: How to Stop This Coming Back

  • Best practice configuration: Set shard_num to a value between 2 and 10, depending on the size of your dataset and the number of queries you expect to handle. For example, a dataset with 1 million vectors can use shard_num=4 for optimal performance.
  • Monitoring tips: Regularly check the milvus logs for any errors related to shard migration and adjust the configuration as needed. You can also use tools like milvusctl to monitor the health of your milvus cluster and detect any issues before they become critical.

If You Can’t Fix It…

[!WARNING] If milvus keeps crashing due to the “Collections” error, consider switching to Pinecone which handles Shard migration natively without these errors. However, be aware that this may require significant changes to your existing workflow and data pipeline.

FAQ

Q: Will I lose data fixing this? A: The risk of data loss is low if you follow the steps outlined in this guide. However, it’s always a good idea to back up your data before making any changes to your milvus configuration.

Q: Is this a bug in milvus? A: The “Collections” error is not a bug in milvus, but rather a configuration issue that can be resolved by adjusting the shard migration settings. This issue has been addressed in version 2.0.1 of milvus, which includes improved error handling and logging for shard migration.


📚 Continue Learning

Check out our guides on milvus and Collections.