Production Ledger Summary and Report Generation for Continuous Basic Chemical Manufacturing: Database and Operations Maintenance

Typical enterprises in continuous basic chemical manufacturing include chlor-alkali, synthetic ammonia, methanol, and soda ash producers. Daily

What the data for this category looks like

Typical enterprises in continuous basic chemical manufacturing include chlor-alkali, synthetic ammonia, methanol, and soda ash producers. Daily generated documents cover operating procedures, process index cards, DCS trend charts, laboratory reports, interlock bypass records, special work permits, shift reports, and more. Data sources primarily include DCS/SIS systems, online analyzers, LIMS systems, equipment condition monitoring modules, energy metering devices, and raw material tank level sensors. Data update frequencies fall into three categories: real-time, per-shift, and daily. Fields include process temperature, pressure, flow, material composition, equipment operating duration, and similar. Common units include degrees Celsius, megapascals, cubic meters per hour, and mass percentage.

What constraints these characteristics impose on database and operations maintenance

DCS data with high real-time requirements needs database support for low-latency read and write operations. Adjust connection pool configuration to match concurrent request volume. Multi-source heterogeneous data, such as composition data from online analyzers and laboratory results from LIMS systems, needs unified field mapping to avoid storage confusion. Batch ledger data generated per shift or daily requires scheduled synchronization tasks. Configure a reliable scheduled trigger mechanism. Interlock data related to hazardous media needs guaranteed storage reliability to prevent data loss that causes operational abnormalities. Differences in update frequencies across data sources require differentiated cache configuration strategies. This prevents high-frequency data from occupying excessive storage resources.

How to set configurations

This page’s configurations are based on FastGPT v4.17.0.

Configuration ItemRecommended ValueRationale
MONGODB_URImongodb://fastgpt:pass@dcs-db:27017/fastgpt_chem?replicaSet=rs_dcsReal-time DCS data for basic chemical manufacturing relies on replica sets to ensure high availability, so the corresponding business database and replica set address must be specified
PG_URLpostgresql://fastgpt:pass@lims-db:5432/fastgpt_chemUsed to store structured ledger fields such as shift reports and work permits, and must be compatible with the transactional characteristics of relational data
DB_MAX_LINK100–150Matches the total concurrent connection requirements of real-time DCS data and batch synchronization tasks, to avoid connection exhaustion
REDIS_URLredis://:fastgpt@cache-db:6379/0Caches high-frequency alarm data and temporary synchronization task status, uses the default Redis service port

Three common configuration errors

  • Scenario: An error MONGODB connection refused displays when starting FastGPT. The cause is that MONGODB_URI is not set to a complete connection string with the correct host address and port. This prevents connection to the MongoDB database associated with the DCS system.
  • Scenario: The database connection configuration page does not accept port number input. The cause is that the advanced connection parameter option is not enabled in the FastGPT v4.17.0 configuration interface. This disables the port input box.
  • Scenario: Periodically generated process ledger reports omit composition data from online analyzers. The cause is that DB_MAX_LINK is set too low. This releases partial connections early during batch LIMS data synchronization, leading to failed data writes.

How to confirm configurations are correct

  • Run a database connection test command to verify that databases configured with MONGODB_URI and PG_URL can establish normal connections.
  • Submit a simulated real-time DCS process data entry to confirm successful writing to the corresponding database collection.
  • Trigger a shift report generation task to check if all configured data source data is pulled and a complete report is generated.
  • View alarm data cached in Redis to confirm cached data updates and expiration follow the preset cycle.

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