Data Characteristics for This Category
Data for this category comes from ERP material master data, melting furnaces and thermometers, spectrometers, MES heat records, mold management systems, customer drawings, and technical specifications. Daily documents include foundry process cards, batching lists, heat records, mold histories, first article inspection records, material test reports, and nonconforming product review forms. Data is updated per heat, per batch, or daily. Core fields include heat number, mold cycle, alloy composition parameters, melting temperature, pouring parameters, and defect type. Units include degrees Celsius, kilograms, and others. Data indexes are used to speed up quick searches by heat number and mold cycle, improving traceability efficiency. Products in this category are formed from liquid metal. Quality focus centers on internal defects in the melting, pouring, and solidification stages. This creates distinct data characteristics compared to forging categories, which rely on plastic deformation.
Constraints for Database and Operations
Multi-source heterogeneous data sources require the database to support mixed storage of structured and unstructured data. This ensures associated queries for heat records, test data, and documents. High-frequency updates per heat create peak write pressure. Connection pools must be properly configured to handle concurrent requests. Defect traceability requires associating multi-dimensional data such as heat number, mold cycle, and test parameters. This places demands on the database's associated query performance. Unstructured documents such as nonconforming product review forms must be stored bound to structured data. This ensures contextual integrity during retrieval. Data update frequencies are uneven. Write requests during peak periods may exceed the connection limit of standard configurations. Sufficient connection resources must be reserved. Semantic retrieval for unstructured documents requires vector database storage of features. This ensures accurate semantic matching during retrieval.
Configuration Settings
These configurations are based on FastGPT v4.17.0, adapted to meet database and operations needs for foundry scenarios:
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
MONGODB_URI | mongodb://fastgpt:xxx@mongodb:27017/foundry_qc?authSource=admin | Stores structured multi-source data such as heat records and spectrometer test data, supports cross-table associated queries |
PG_URL | postgresql://fastgpt:xxx@postgres:5432/foundry_qc | Stores documents with metadata such as mold histories and nonconforming product review forms, ensures structured retrieval performance |
DB_MAX_LINK | 15–25 | Adapts to peak connection demands from high-frequency writes per heat, prevents database connection exhaustion |
REDIS_URL | redis://:xxx@redis:6379/1 | Caches popular heat query results and mold status information, reduces repeated database access overhead |
| Single recall limit | Top 8 entries | Matches the scale of multi-dimensional parameter entries requiring association in foundry scenarios, avoids returning redundant content |
Three Common Misconfigurations
- Symptom: Database connection timeout error, status code 504. Cause: The
DB_MAX_LINKvalue was not adjusted to account for high-frequency updates per heat, leading to connection pool exhaustion and inability to create new connections. - Symptom: Mold history information for the corresponding heat is missing from retrieval results. Cause: The associated query permission for the
MONGODB_URIconfiguration was not set correctly, and the association field between heat number and mold cycle was not bound. - Symptom: Excessive repeated query pressure caused by Redis cache expiration. Cause: A reasonable cache expiration time was not set based on the update frequency of foundry data, and no differentiation was made between high-frequency heat query data and low-frequency historical documents.
How to Verify Correct Configuration
- Perform a simulated heat data write operation, check if the databases corresponding to
MONGODB_URIandPG_URLsuccessfully write the corresponding fields. - View Redis connection logs, confirm that the instance configured with
REDIS_URLnormally receives cache requests, with no connection refused errors. - Initiate a defect traceability retrieval request, verify that the returned results include core fields such as heat number, mold cycle, and test parameters, and that field integrity meets business requirements.
- Simulate a peak write scenario, check if the connection number configured for
DB_MAX_LINKmeets concurrent write demands, with no connection timeout errors.
The values provided are common starting points and should be evaluated against the reader's own samples.