What this category of data looks like
Core data for this category covers daily business documents of manufacturing enterprise PMC, planning, shop scheduling, and material control departments, including sales orders, master production schedules, material requirement plans, weekly and daily scheduling sheets, work orders, material shortage lists, delivery change notices, and more. Data sources include ERP orders and inventory, BOMs, process routes, equipment capacity, staff shifts, work in progress, and supplier delivery information. Update frequencies include daily batch synchronization, weekly summary updates, and real-time updates when orders or exceptions occur. Data fields include order number, process ID, equipment number, scheduling time period, material code, work in progress quantity, and more. Units include pieces, hours, days, and more. Multi-dimensional information must be associated across products and processes.
What constraints do these characteristics impose on the "database and operations" link
Multi-source heterogeneous data sources require the database to support mixed storage of structured and semi-structured data, and flexibly adapt to write and query requirements for different types of ledgers. Non-fixed update frequencies require the database to support parallel operation modes of real-time writing and scheduled batch synchronization to avoid data conflicts. Complex data structures associated across processes require the database to have efficient associated query capabilities, while ensuring connection stability under high concurrency. Real-time data updates in exception scenarios such as emergency order additions or material shortages require the operations link to have the ability to quickly adjust database configurations and synchronization strategies to avoid impacting core scheduling business. This page is adapted for FastGPT v4.17.0.
How to set the configurations
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
MONGODB_URI | mongodb://prod_plan_user:Prod123!@10.0.0.5:27017/prod_plan_db?authSource=admin | Stores semi-structured data such as equipment logs and work in progress ledgers, adapting to business records with non-fixed formats |
PG_URL | postgresql://plan_sched_user:Plan456!@10.0.0.6:5432/prod_sched_db?sslmode=require | Stores structured associated data such as work orders, scheduling sheets, and material requirement plans, supporting complex multi-table queries |
DB_MAX_LINK | 25 | Adapts to concurrent connection requirements for daily ERP data synchronization and emergency order addition processing, avoiding connection exhaustion |
REDIS_URL | redis://redis_pass@10.0.0.7:6379/1 | Caches frequently accessed equipment capacity and staff shift data, reducing repeated database query overhead |
| Database automatic backup cycle | 3:00 AM daily | Avoids peak hours for production data batch synchronization, ensuring the integrity and availability of backup data |
Three common mistakes
- Symptom: MongoDB connection status shows failure, with an authentication failure prompt returned in logs. Cause: The
authSourceparameter inMONGODB_URIis not configured correctly, making it impossible to complete write operations for ERP data synchronization using the preset account. - Symptom: Database connection calls in the orchestration flow return error
Failed to connect to jyfkk:1433, but the connection can be made normally via the visualization tool. Cause: The FastGPT orchestration module does not load the driver dependencies for the corresponding database, so the specified database connection protocol cannot be recognized when the project starts. - Symptom: The database reports a
too many connectionserror and cannot process new scheduling update requests. Cause: TheDB_MAX_LINKparameter is not set reasonably, exceeding the maximum connection limit of the database when synchronizing multi-source data concurrently.
How to confirm the configuration is complete
- Execute the database connection test script to verify that the databases corresponding to
MONGODB_URIandPG_URLcan normally read and write core business data such as work orders and scheduling sheets. - View the current connection count via the database monitoring panel, confirming that the actual concurrent connection count does not exceed the value set by
DB_MAX_LINK. - Use the Redis client to query cached key-value pairs, confirming that frequently accessed data such as equipment capacity and staff shifts has been normally loaded into the cache.
- Trigger an ERP order synchronization task, check that there are no errors in the logs, confirming that data can be normally written to the corresponding database.
The values given are common starting points and should be measured against the reader's own samples.