Production Ledger Aggregation and Report Generation for Continuous Basic Chemical Manufacturing: Deployment and Upgrade

Daily data for continuous basic chemical manufacturing includes multi-source structured and unstructured content. Data sources include DCS/SIS control

What the Data for This Category Looks Like

Daily data for continuous basic chemical manufacturing includes multi-source structured and unstructured content. Data sources include DCS/SIS control systems, online analyzers, LIMS laboratory management systems, equipment condition monitoring, energy metering devices, and raw material tank ledger records. Update frequencies fall into three categories: real-time (such as process parameters, interlock status), shift-based (such as shift reports, inspection records), and daily (such as laboratory summaries, energy consumption reports). Daily documents include operating procedures, process index cards, DCS trend charts, laboratory reports, interlock bypass records, special work permits, and shift reports. Fields cover reaction temperature, material flow rate, pressure value, and more. Units are standard process industry units such as MPa, Nm³/h, t/h.

Constraints Imposed on Deployment and Upgrade

The data characteristics of this category impose multiple constraints on the deployment and upgrade process. Concurrent access demands for multi-source real-time data require a sufficiently large database connection pool to prevent system lag caused by exhausted connections. Data with different update frequencies need tailored synchronization strategies. Real-time data requires low-latency synchronization, while daily summary data can use batch updates. Mixed-type documents (structured ledgers, semi-structured work permits, unstructured trend charts) require the system to support multi-format parsing and storage. Compatible object storage and databases must be configured. Deployment and upgrade in continuous manufacturing scenarios cannot interrupt core processes. Gray release strategies must be used to ensure ledger aggregation tasks run normally during upgrades. High reliability requirements for data related to strong interlocks require database master-slave replication and cache persistence mechanisms to avoid data loss that could impact production safety.

Configuration Settings

The following configurations are based on FastGPT v4.17.0, and are adapted to the deployment requirements of ledger aggregation and report generation for continuous basic chemical manufacturing scenarios.

Configuration ItemRecommended SettingRationale
DB_MAX_LINK100–150 connectionsAdapts to concurrent query demands for multi-source DCS, LIMS, and energy metering data, avoiding connection pool exhaustion
MONGODB_URImongodb://<user>:<pass>@<host>:27017/fastgpt_chem?authSource=adminStores unstructured documents such as DCS trend charts, special work permits, and interlock bypass records
PG_URLpostgresql://<user>:<pass>@<host>:5432/fastgpt_chemStores structured field-based ledger data such as shift reports, laboratory reports, and process index cards
REDIS_URLredis://:<pass>@<host>:6379/0Caches real-time process parameters and user sessions to reduce latency for high-frequency queries
STORAGE_S3_ENDPOINThttp://<minio-host>:9000Archives and stores files such as batch-uploaded operating procedures and historical laboratory reports
ROOT_KEYGenerated in accordance with internal enterprise key management rulesUsed for system initialization and permission control, complying with security and compliance requirements for chemical production scenarios

Three Common Mistakes

  • When deploying Qwen3 series models with vllm, response fields cannot be extracted from ledger results parsed from PDF files, and returned results are empty. Cause: The correct vllm service address and model name are not specified in the FastGPT configuration, or the exclusive prompt format requirements for Qwen3 are not met.
  • Frequent database connection timeout errors occur, with a 504 status code returned. Cause: The DB_MAX_LINK configuration value is too low to support concurrent access requests for multi-source real-time data.
  • Some real-time process data cannot be synchronized to the ledger normally after an upgrade. Cause: The cache configuration corresponding to REDIS_URL was not backed up before the upgrade, causing conflicts between newly deployed cache key-value pairs and the existing production environment and interrupting real-time data caching.

How to Confirm the Configuration Is Properly Set

  • Run a database connectivity test to verify the connection validity of PG_URL and MONGODB_URI, and check that the concurrent connection count falls within the range specified by DB_MAX_LINK.
  • Upload a typical special work permit document to confirm that the system can correctly parse the document content and extract key fields such as work time and isolation measures.
  • Trigger a full ledger aggregation task to check that the generated report includes real-time DCS data, daily shift report information, and the latest laboratory results.
  • View system operation logs to confirm that there are no error messages related to exhausted database connections, expired cache exceptions, or failed model calls.

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