What data for this category looks like
This category of data primarily originates from wood pulp and waste paper batch ledgers, DCS/QCS control systems, paper machine online measurement equipment, laboratory testing systems, and energy and water treatment systems. Daily generated documents include pulp preparation orders, beating records, paper machine operation records, online quality curves, laboratory reports, sheet break and product change records, and similar items. Data update frequencies cover real-time (such as online quality curves), per shift (such as shift production reports), and per roll (such as finished paper quality inspection reports). Fields include pulp ratio, machine speed, grammage, moisture content, thickness, cross and longitudinal quality deviation, and similar metrics. Common units include percentage, grams per square meter, meters per minute, and other standard units.
Constraints imposed on database and operations workflows
The multi-source real-time and batched data characteristics of this category create multiple constraints for database operations. Frequently updated online data requires the database to support high-concurrency connections, so connection pool parameters must be configured properly. Quality inspection and production records stored by batch and roll require indexes built along production dimensions to accelerate traceability queries. The stability of real-time data streams requires the database to support replica set failover, to prevent service interruptions caused by primary node drift. The need to integrate multiple data sources requires operations workflows to support flexible combinations of database components, to adapt to the storage formats of different business data.
How to set configurations
| Configuration Item | Recommended Setting | Rationale for This Setting |
|---|---|---|
MONGODB_URI | mongodb://user:pass@host:27017/paper_prod?replicaSet=rs0 | Adapt to replica set storage requirements for real-time sheet break and product change records, support failover |
PG_URL | postgresql://user:pass@host:5432/paper_qc?search_path=public | Store structured quality inspection data such as pulp preparation orders and laboratory reports, support complex associated queries |
DB_MAX_LINK | 200–300 connections | Match high-concurrency data write requests from paper machine online measurement and DCS systems, avoid connection exhaustion |
REDIS_URL | redis://:pass@host:6379/0 | Cache the latest sampled data of real-time quality curves, reduce real-time query pressure on the database |
Three common configuration mistakes
- Symptom: Database component conflict errors occur during deployment, and logs show unused pgvector configuration items. Cause: Deployment configurations of vector databases and business databases are mixed, and irrelevant components such as pgvector and ob are written into a single-scenario compose file.
- Symptom: Database connections are interrupted after primary node drift, and automatic recovery fails. Cause: Database replica set parameters are not configured, or the automatic reconnection mechanism is not enabled, resulting in interruption of real-time production data streams.
- Symptom: Timeouts occur when querying full production data for a single roll of paper in bulk. Cause: Joint indexes are not built by production batch and roll number, resulting in full table scans that consume excessive system resources.
How to confirm correct configuration
- Use the database diagnostic tool included with FastGPT v4.17.0 to verify that
MONGODB_URIandPG_URLcan complete read and write operations normally. - Simulate a database primary node switch, check whether the real-time data collection service can automatically reconnect to the new primary node without data interruptions.
- Import full production and quality inspection data for a single roll of paper, run a query test by roll number, and verify that the response time meets business expectations.
- View the database connection pool monitoring panel, confirm that the current active connection count does not exceed the
DB_MAX_LINKconfiguration threshold, and there is no connection exhaustion.
The values given are common starting points and should be measured against the reader's own samples.