What This Category of Data Looks Like
Data related to campaign setup is typically maintained by ad optimizers, agency operations teams, and growth teams. Daily documents include campaign plans, targeting settings, budget schedules, and conversion tracking configurations. Data sources primarily include ad platform account structures, internal user profile datasets, budget management spreadsheets, and event configuration items from attribution tools. Data is updated daily or before each campaign launch. Documents primarily consist of structured configuration fields including plan name, targeting dimension tags, daily budget quota, conversion event type, and more. Units include yuan, sessions, days, and other standard metrics.
Constraints Imposed on Database and Operations Workflows
The multi-source access nature of this data requires database operations to support integration with heterogeneous data sources, to avoid performance bottlenecks from a single database. The daily or campaign-level update rhythm requires database connection pools to adapt to short-term concurrent fluctuations, to prevent connection exhaustion. Structured configuration fields require databases to support field validation, to avoid writing invalid configuration data. Incorrect campaign configurations can directly lead to budget waste or missing conversion data. For this reason, database connection status monitoring and data synchronization success rate alert mechanisms must be established to ensure the stability of the configuration pipeline.
How to Configure Settings
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
MONGODB_URI | mongodb://user:pass@host:27017/fastgpt_ad_plan | Stores structured configuration data for campaign plans, matches naming conventions for advertising business databases, and adapts to the document storage logic of FastGPT v4.17.0 |
PG_URL | postgresql://user:pass@host:5432/ad_targeting | Stores structured data for targeting audience tags and budget schedules, supports complex targeting condition queries |
DB_MAX_LINK | 20–30 concurrent connections | Adapts to daily data update fluctuations for campaign setup, prevents connection exhaustion from impacting synchronization tasks |
REDIS_URL | redis://:pass@host:6379/0 | Caches temporary calculation results for targeting audiences and verification data for conversion events, reduces query pressure on the primary database |
| Data Sync Trigger Rule | Triggered at campaign launch timing | Adapts to the launch rhythm of campaign plans, avoids unnecessary scheduled synchronization consuming resources |
Three Common Configuration Mistakes
- Symptom: Database connection failure is displayed in logs, with the prompt
connection refused. Cause: Authentication information forMONGODB_URIorPG_URLis not configured correctly, or the corresponding port access permission for the database instance is not enabled. - Symptom: Data is empty after campaign configuration synchronization, with a result count of 0. Cause:
DB_MAX_LINKis set too low, and insufficient concurrent connections cause data pull and write tasks to interrupt. - Symptom: Uploaded budget schedule files fail to load normally. Cause: Large-volume campaign documents are mistakenly stored in a relational database, and object storage links are not used for file persistence.
How to Verify Successful Configuration
- Log in to the FastGPT database configuration management page, verify the connectivity of
MONGODB_URI,PG_URL, andREDIS_URL, and check whether a connection success prompt is returned. - Manually trigger a test campaign plan synchronization task, and check whether configuration data entries that meet the required format are generated in the corresponding databases.
- View the operation and maintenance monitoring panel, confirm that the database connection count does not exceed the preset threshold, and there are no alerts related to connection exhaustion.
- Upload a test campaign plan document, confirm that the file storage link returns no errors, and file content can be 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.