Quality Problem Traceability and Defect Analysis for Process Quality and Finished Product Release: Database and Operations Maintenance

This category of data covers documents including control plans, patrol inspection records, SPC reports, finished product inspection reports

What the data for this category looks like

This category of data covers documents including control plans, patrol inspection records, SPC reports, finished product inspection reports, nonconforming product reviews, release orders, and more. Data sources include production MES systems, online inspection equipment, laboratory testing systems, process parameter libraries, customer quality standards, and historical defect libraries. Data is continuously collected at the frequency of each production batch and each shift. Fields include inspection item number, tolerance range, batch number, inspection result, statistical value, qualified judgment identifier, and more, with corresponding units such as mm, kg, and hours.

Multi-source data access requires the database to support mixed structured and unstructured storage, and adapt to data writing in different formats from MES systems, online inspection equipment, laboratory systems, and other sources. The high-frequency update rhythm per production batch and each shift requires the database connection pool to have a sufficient number of concurrent connections to avoid blocking during batch writing. For metadata management of multiple types of documents, clear field mapping rules are needed to ensure uniformity of units, qualified judgment identifiers, and other attributes across data from different sources. The long-term retention requirement of the historical defect library requires the database to support partitioning of hot and cold archived data, balancing storage costs and query efficiency.

How to set the configurations

Configuration ItemRecommended ValueRationale
MONGODB_URImongodb://fastgpt:xxxx@db-host:27017/quality?authSource=adminAdapts to FastGPT v4.17.0 for storing mixed structured and unstructured quality data, supports storage of metadata and content for documents such as control plans and finished product inspection reports
DB_MAX_LINK30–60Addresses high-frequency data write requests per batch and shift, avoiding collection interruptions caused by connection pool exhaustion
REDIS_URLredis://:xxxx@redis-host:6379/1Caches frequently accessed SPC reports and process parameter data to reduce query pressure on the primary database
Database batch write threshold100–200 records per batchMatches the batch data upload rhythm of production batches, balancing write efficiency and resource usage
Data archiving cycleCalibrated to individual production batch cycleDistinguishes hot and cold archived data to optimize query performance for the historical defect library

Three Common Misconfigurations

  • Symptom: After starting the Docker container, an error is reported indicating inability to connect to MongoDB, with the log showing Connection refused. Cause: The MONGODB_URI configuration item was not modified correctly, or the database connection parameters inside the container do not match the host machine configuration.
  • Symptom: Connecting to the local FastGPT MongoDB instance via MongoDB Compass fails, and the quality data collection cannot be viewed. Cause: Firewall permissions for the default MongoDB port 27017 were not opened, or the authentication username and password were configured incorrectly.
  • Symptom: Some data is lost when batch importing patrol inspection records, and the number of query results is insufficient. Cause: The DB_MAX_LINK parameter value was not set appropriately, and insufficient connections caused some write requests to be discarded.

How to Confirm the Configuration is Correct

  • Execute the database connection test script to verify that the MONGODB_URI and REDIS_URL configuration items can establish connections normally, with no timeout or authentication failure prompts.
  • Import a single batch of simulated patrol inspection record data, check the response time of database write requests, and confirm that the connection pool is not exhausted.
  • View the Redis cache monitoring panel to confirm that frequently queried SPC reports and process parameter data have been cached normally.
  • Compare the imported document metadata with the fields and units of the original data to confirm that the mapping rules have taken effect correctly.

The values provided are common starting points and should be measured against the reader's own samples.