Online Troubleshooting and Retrospective for Capacity Planning and Resource Scaling: Deployment and Upgrade

Data for this category is primarily sourced from cloud bills, monitoring systems, business forecasts, and stress test reports, with an update

What this category of data looks like

Data for this category is primarily sourced from cloud bills, monitoring systems, business forecasts, and stress test reports, with an update frequency of weekly or monthly. Daily generated documents include capacity planning reports, expansion applications, resource utilization reports, and budget calculation sheets. Fields cover resource usage peaks, application quotas, budget allocation items, and load indicators collected via monitoring. Storage formats are mostly structured tables and offline report files, with no fixed unified single-field unit. Corresponding measurement standards must be matched based on specific business scenarios.

What constraints these characteristics impose on deployment and upgrade workflows

The data characteristics of this category directly restrict deployment and upgrade processes. Data relies on external databases and cache storage, so correct configuration of connection parameters such as MONGODB_URI and REDIS_URL is required during deployment to ensure normal reading of existing business data. The weekly or monthly update frequency requires full migration of existing data during upgrades to avoid interrupting the business link for capacity planning and resource configuration. Documents contain sensitive budget and resource configuration information, so configuration modification permissions must be controlled through parameters such as ROOT_KEY. The peak prediction link relies on real-time monitoring data, so the collection link must be validated during deployment to prevent data distortion from configuration errors.

How to set configurations

Configuration ItemRecommended SettingRationale
MONGODB_URIFill in the MongoDB connection address for the deployment environment, including database authentication informationUsed to store core business data such as capacity planning reports and knowledge base data, requires stable connectivity
REDIS_URLConfigure connection timeout to 300 seconds, fill in the internal Redis cluster addressUsed to cache resource utilization data collected by monitoring, timeout setting matches the weekly collection interval of business monitoring
DB_MAX_LINKSet to 200–300Adapts to concurrent requests during weekly capacity planning report generation, avoids database connection overload
STORAGE_S3_ENDPOINTFill in the access endpoint of the enterprise internal object storageUsed to store document data such as stress test reports and resource utilization reports, must match the business storage path
ROOT_KEYGenerate a key according to the permission management rules of the operations and maintenance teamUsed to control modification permissions for capacity planning configurations, prevents unauthorized adjustments
FILE_TOKEN_KEYGenerate a random 32-character stringUsed to generate access tokens for capacity planning documents, ensures access security for internal documents

Three common mistakes

  • Symptom: The content extraction feature supported on the official website for the same version fails after self-hosted deployment. Cause: FILE_TOKEN_KEY or STORAGE_S3_ENDPOINT is not configured correctly, causing extracted files to fail to be stored or accessed normally.
  • Symptom: After upgrading from FastGPT v4.6.7 to FastGPT v4.17.0, existing knowledge base data cannot be loaded, and a "resource does not exist" prompt is displayed when accessing the application. Cause: The database directory corresponding to MONGODB_URI was not migrated correctly, or the authentication configuration of the original database was not retained during the upgrade.
  • Symptom: Resource utilization data in capacity planning reports is empty after online resource scaling. Cause: The connection configuration of REDIS_URL was not updated synchronously, causing cached monitoring data to fail to be read normally.

How to confirm configurations are correct

  • Run a database connection command to verify that the authentication information for MONGODB_URI is correct, and that existing capacity planning and knowledge base data can be read.
  • After starting the service, check monitoring metrics to confirm that the number of database connections does not exceed the DB_MAX_LINK configuration value, and there are no connection timeout errors.
  • Upload a test file and trigger the content extraction feature to verify that the file can be stored normally and extraction results are returned, confirming that STORAGE_S3_ENDPOINT is configured correctly.
  • Check cache logs to confirm that the connection to REDIS_URL is normal, and that resource utilization data collected by monitoring can be written and read normally.

The values provided are common starting points and should be measured against the reader's own samples.

Question material comes from public community discussions. Configuration values are common starting points and should be measured against your own samples. Verified on 2026-10-19.