What Data for This Category Looks Like
Data for this category primarily comes from advertising platform APIs, internal budget scheduling sheets, user profile tag libraries, and attribution tools. Daily produced documents include campaign setup plans, targeting setting rules, budget allocation plans, and conversion tracking configuration items. Data is updated either via daily synchronization or single activity-triggered updates. A single campaign setup plan data entry includes fields such as unique plan identifier, target audience range, daily budget limit, and associated conversion event ID. Field units include yuan, person-times, days, and other standard units.
What Constraints Do These Characteristics Impose on Database and Operations Workflows
Data for this category comes from multiple dispersed sources. It requires integration with various data sources including advertising platforms, budget sheets, and attribution tools. The database must support writing and associative queries for multi-format data. Data update rhythms vary. Some configurations require real-time synchronization of activity-triggered updates, while others require daily batch pulling of reports. This places demands on the concurrent processing capability of database connection pools. Campaign setup plan data directly affects ad launch and conversion statistics. Data loss or errors can lead to budget waste or missing conversion data. This requires ensuring the stability and recoverability of data read and write operations. Mixed storage of unstructured documents and structured data requires balancing performance for high-frequency queries and cost control for long-term storage.
How to Configure Settings
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
MONGODB_URI | mongodb://[username]:[password]@[host address]:[port]/fastgpt?authSource=admin | Adheres to the official MongoDB connection format for FastGPT v4.17.0, supports account password authentication and specified database |
PG_URL | postgresql://[username]:[password]@[host address]:[port]/fastgpt?sslmode=require | Supports PostgreSQL as the structured data storage engine. sslmode=require ensures secure data transmission |
DB_MAX_LINK | 20–30 | Matches the concurrent volume of daily data synchronization and queries for this category, prevents service interruptions caused by exhausted connection pools. The specific value can be calibrated via actual testing |
REDIS_URL | redis://:[password]@[host address]:[port]/0 | Used to cache high-frequency query target audience tags and budget configurations, reduces repeated read/write pressure on the database |
Three Common Configuration Errors
- Symptom: Login failure or service failure to start after modifying the MongoDB configuration file and restarting. Cause: The
authSourceparameter ofMONGODB_URIis not configured correctly, or the username and password in the connection string do not match the actual deployed MongoDB instance. - Symptom: Data write failure occurs after attempting to replace PostgreSQL with ClickHouse. Cause: FastGPT does not natively support ClickHouse as a core storage engine. Unadapted database replacement will cause data format incompatibility.
- Symptom: Database connection timeout or service interruption occurs after version upgrade. Cause: The
DB_MAX_LINKparameter is not adjusted to match the concurrent requirements of the new version, or database images and data volumes are not backed up in advance, making rapid recovery impossible after upgrade failure.
How to Verify Successful Configuration
- Run the database connection test script to verify the connection status of
MONGODB_URI,PG_URL, andREDIS_URL, ensuring there are no prompts for authentication failure or address errors. - Simulate the creation and synchronization process of a single campaign setup plan, check whether corresponding structured data and cache entries are generated in the database, and confirm that the
DB_MAX_LINKparameter does not trigger connection exhaustion. - View system logs to confirm there are no error messages about database connection timeout or read/write failure, and verify configuration stability.
- Export database backup files and data volumes, confirm they can be read normally, and verify the availability of the recovery process after upgrade or failure.
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.