What data looks like for this category
The data for this category primarily comes from formula systems, raw material batch records, internal mixers, Mooney viscometers and rheometers, vulcanizing presses, and laboratory testing equipment. Daily documents include formula sheets, weighing records, mixing curves, rapid rubber compound test reports, vulcanization process cards, mold usage records, and finished product performance reports. Data is updated per truckload of rubber, per batch of raw materials, or per production cycle. Fields include mixing temperature (unit: degrees Celsius), vulcanization duration (unit: seconds), batch number, raw material lot number, rubber compound performance test values, and more. Individual data entries are small in size but generated at high frequency.
Constraints on database and operations
The high-frequency, small-volume data write requirements require the database connection pool to support rapid reuse, avoiding overhead from frequent connection establishment and termination. Multi-source heterogeneous data access needs require compatibility with structured ledgers and semi-structured data types such as mixing curves and process cards. Data updates and queries are closely linked, so atomicity of writes and queries must be ensured to prevent errors in ledgers for the same production batch. As production scale expands, total data volume continues to grow. Expired ledgers must be regularly cleaned or hot and cold data storage partitioned to avoid exhausting storage resources. Additionally, time-series data such as mixing curves require efficient range query support to adapt to subsequent report generation needs.
How to set configurations
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
MONGODB_URI | mongodb://admin:securepass@db1:27017,db2:27017/?replicaSet=rs0 | Supports storage of semi-structured data such as mixing curves and rapid rubber compound test reports; multi-node configuration improves write availability |
PG_URL | postgresql://produser:dbpass@pg-host:5432/rubber_prod?connect_timeout=10 | Stores structured data such as formula sheets, weighing records, and finished product performance reports; supports complex associated queries |
DB_MAX_LINK | 15–25 connections | Matches the concurrent requirements of high-frequency, small-data writes per production cycle; prevents connection pool exhaustion or database overload |
REDIS_URL | redis://redispass@cache-host:6379/1 | Caches commonly used mold records and raw material batch mapping information to reduce database query frequency |
Three common mistakes
- Symptom: When executing SQL queries, some identically formatted statements return data normally, while others fail or return empty results. Cause: The
DB_MAX_LINKparameter was not adjusted for this category’s high-frequency write scenario. A value that is too low exhausts the connection pool, preventing subsequent requests from obtaining valid connections. - Symptom: Semi-structured documents such as mixing curves and vulcanization process cards cannot be stored correctly. Cause: A database connection that only supports pure structured tables was incorrectly selected; the
MONGODB_URIconfiguration adapted to semi-structured data was not used. - Symptom: Workflows stop after executing database tool nodes, with no clear error message or only a connection timeout displayed. Cause: The
MONGODB_URIorPG_URLconfiguration does not specify correct database access permissions, or network policies restrict access to database ports.
How to confirm configurations are correct
- Check the parameter format of each database connection configuration, confirm that
MONGODB_URI,PG_URL, andREDIS_URLinclude correct host, port, and authentication information, with no syntax errors. - Use the FastGPT v4.17.0 database tool node to perform test write and query operations for typical data types of this category, verifying that data can be stored and read normally.
- Simulate high-frequency write requests, observe the usage status of the database connection pool, and adjust the value of
DB_MAX_LINKbased on actual concurrent volume. - View system logs to confirm there are no error messages such as database connection timeouts or permission denials, and correct corresponding configuration items based on error content.
The values provided here are common starting points and should be measured against the reader's own samples.