What Data Looks Like for This Category
Data for this category primarily comes from CAD/CAM software, order BOMs, sheet metal inventory systems, laser cutter and bending machine device logs, and workshop MES systems. Daily generated documents include part unfolding drawings, CNC cutting programs, bending process cards, nesting drawings, first-piece inspection records, and process flow cards. Data updates are triggered by order creation, daily inventory checks, and each equipment model change. Fields include part unfolding dimensions, bending compensation coefficients, sheet metal specifications, process flow status, and more. Common units are millimeters, square meters, and kilograms.
What Constraints These Characteristics Impose on the Database and Operations Link
Heterogeneous data from multiple sources requires unified structured storage. This avoids data format conflicts across systems and ensures the accuracy of subsequent quality traceability. High-frequency update triggers require the database connection pool to maintain sufficient available connections. This prevents request blocking that delays entry of process data. The multi-variety, small-batch business model causes data volume to fluctuate with orders. Storage resources must support dynamic scaling to avoid insufficient storage space or wasted resources. The strong correlation between process flow and device logs requires accurate foreign key relationships between data. Without these, full-link traceability from defective products to production links cannot be completed. Additionally, batch data updates triggered by a single equipment model change must limit single-transaction operation scale. This avoids database table locking that disrupts overall production data synchronization.
How to Set Configurations
This configuration applies to FastGPT v4.17.0.
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
MONGODB_URI | mongodb://fastgpt:password@localhost:27017/fastgpt?authSource=admin | Adapts to multi-source heterogeneous document storage requirements, specifies the authentication source to ensure secure access to production data |
DB_MAX_LINK | 20–30 | Matches high-frequency device log and order data update scenarios, prevents connection exhaustion or resource waste |
REDIS_URL | redis://:fastgpt-redis@localhost:6379/0 | Caches frequently accessed bending coefficients and nesting rule data to reduce database query pressure |
PG_URL | postgresql://fastgpt:password@localhost:5432/fastgpt | Stores structured process flow card and first-piece record data to ensure efficient associated queries |
Three Common Mistakes
- After upgrading the version, knowledge base content does not display synchronously. Cross-version database migration operations fail. The cause is incorrect configuration of the
MONGODB_URIauthentication parameter. This leads to inconsistent permissions between old and new database connections. - When creating a new question classification node, an error occurs when running or saving and publishing using the initialized AI model. Normal operation resumes after switching the AI model. The cause is that the
REDIS_URLcache for model call context is not configured. This causes the single request data volume to exceed the limit. - In a Docker-deployed FastGPT instance, the initial MongoDB database connection works normally. A connection error occurs after a period of time. The cause is that a reasonable value for
DB_MAX_LINKis not set. The connection pool is exhausted and cannot create new connections.
How to Confirm the Configuration Is Correct
- Log in to the FastGPT admin backend, enter the database configuration page in system settings, and check that the parameter values of
MONGODB_URI,PG_URL,DB_MAX_LINK, andREDIS_URLmatch the preset configuration. - Upload a sheet metal part unfolding drawing and nesting drawing. Perform a knowledge base synchronization operation, and confirm that data is successfully written to the database with no error prompts.
- Simulate a batch data update for an equipment model change. View the database monitoring panel, and confirm that the active connection count does not exceed the
DB_MAX_LINKlimit. - Restart the FastGPT container instance. Verify that the database connection recovers automatically, with no initial connection failure log output.
The values provided are common starting points and should be measured against the reader's own samples.