What Data for This Category Looks Like
Data for this category originates from PLM, ERP, MES, supplier materials, validation tests, and customer-specific requirements. It is jointly maintained by R&D, process, quality, production, and procurement teams. Daily documents include ECN/ECR, change assessment reports, drawings and BOM versions, process validation reports, switching plans, inventory disposal documents, and customer approval documents. Data updates follow no fixed cycle; each change triggers a synchronization. Fields include change number, version number, effective date, affected material code, approval status, and others. The version number uses a semantic format, the effective date is a standard date-type field, and approval status is a fixed enumeration value.
Constraints for Database and Operations
Multi-source heterogeneous data sources require the database to support cross-system data synchronization and associated queries. Connection pools must be properly configured to handle concurrent requests from different systems. No fixed update frequency leads to large fluctuations in data volume, so elastic storage capacity must be reserved. Change data is linked to multiple document and business data types, so targeted indexes must be created to ensure query efficiency. Errors in change data can trigger batch production risks, so complete data verification and backup mechanisms must be configured to ensure the accuracy and traceability of ledger data. This guide applies to FastGPT v4.17.0.
Configuration Settings
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
MONGODB_URI | mongodb://[username]:[password]@host:port/fastgpt_ecn?authSource=admin | Corresponds to the business database storing unstructured change documents such as ECN/ECR; specifying the authentication source prevents connection failures |
PG_URL | postgresql://[username]:[password]@host:port/fastgpt_ecm?schema=change_management | Stores structured change ledger fields, associates material and production data from ERP/MES; isolates business data via the schema |
DB_MAX_LINK | 20–30 个 | Handles concurrent connections during multi-system synchronization, avoiding service interruptions caused by exceeding database connection limits |
REDIS_URL | redis://:[password]@host:port/0 | Caches change approval status and version mapping relationships to reduce the overhead of repeated database queries |
Three Common Configuration Errors
- Symptom: A "connection timeout" or "authentication failed" error pop-up appears when connecting to the FastGPT local MongoDB database via MongoDB Compass. Cause: The correct authentication source parameter is not configured in
MONGODB_URI, or the database firewall restricts local access ports. - Symptom: Some associated BOM version fields are empty in the generated ledger report. Cause: Database synchronization tasks are not configured according to the update rhythm of change data, resulting in cross-system BOM data not being synchronized to the FastGPT database in a timely manner.
- Symptom: An out-of-memory error occurs when importing change documents in bulk. Cause: The number of documents imported in a single batch is not limited, or the
DB_MAX_LINKparameter is not configured reasonably, leading to exhaustion of database connection resources.
How to Verify Correct Configuration
- Run a database connection test corresponding to
MONGODB_URIto verify that test data in the ECN document collection can be read successfully. - Initiate a simulated change synchronization task to check whether fields such as change number and effective date can be correctly written to the structured ledger table corresponding to
PG_URL. - View the change approval status data cached in Redis to confirm that the cache expiration time matches the non-fixed cycle characteristic of business updates.
- Simulate a multi-system concurrent synchronization scenario to check whether the
DB_MAX_LINKconfiguration can support concurrent requests without connection rejection errors.
The values given are common starting points and should be measured against the reader’s own samples.