Skip to main content

Database Related

What to do when database capacity reaches its limit?

To ensure efficient resource utilization, CloudBase imposes limits on database storage capacity for each environment. The database storage capacity for each environment is calculated independently.

  • If the remaining storage capacity of the database falls below 10%, you will be notified via SMS, in-site messages, email, etc. You can upgrade your environment version to enjoy more database storage capacity and avoid affecting the normal operation of your business.
  • If the database storage capacity of the environment is exhausted, writing data to the database is not permitted, but reading and deleting data are allowed.

Is there a limit on the number of collections?

Each environment can create up to 100 collections.

Is there a limit on creating documents within a collection?

There is no limit on creating documents within a collection. However, if the number of documents in the collection is large, it is recommended to create indexes to speed up queries and searches.

Is there a limit on the number of indexes?

Each collection can have up to 100 indexes, and each index can contain up to 31 fields.

Why do databases have the _openid field?

Each piece of data written from the WeChat client comes with a default _openid field, which identifies the user to whom the document belongs.

What is the maximum concurrency for the database?

The Basic Edition supports a maximum of 30 concurrent requests. Requests exceeding this limit will be blocked and queued. To ensure smooth operation of your business, create appropriate indexes based on query conditions to prevent queries from being blocked for extended periods.

Why are the modified database collection permissions not taking effect?

The backend has data caching, and all changes will take effect within at most 1 minute.

What are the format restrictions for fields in database documents?

Field names can only contain letters + digits + underscores + dots, with a maximum length of 32 characters, and cannot start with underscore, /, or dot.

Why can some data in the database be seen in the console but not retrieved in the client?

Please check the collection permissions. For permission types other than "public read", the system enforces validation of the _openid field to ensure it matches the current user's identity.

If the data is added via the console, it is administrator-added data without _openid information and therefore not associated with any user. This data can only be edited by administrators through the console and does not support write operations via the client (even administrators cannot perform write operations through the client).