Quality Issue Traceability and Defect Analysis for Petroleum Refining: Deployment and Upgrade

Data sources for petroleum refining scenarios include DCS/APC control systems, LIMS laboratory information management systems, tank farm metering

What the data for this category looks like

Data sources for petroleum refining scenarios include DCS/APC control systems, LIMS laboratory information management systems, tank farm metering systems, crude oil evaluation databases, equipment management systems, and energy management systems. Data update rhythms cover real-time process parameters, shift handover records, daily material balance reports, and daily quality reports. Daily documents include operating procedures, production plans, material balance sheets, distillate export quality reports, interlock ledgers, change management files, and other structured and unstructured content. This content includes process values, equipment status, quality inspection records, and similar data.

What constraints these characteristics impose during deployment and upgrade

Multi-source heterogeneous data sources require adaptation to access protocols of different systems during deployment, and reservation of configuration space for corresponding data synchronization. High-frequency updates of real-time process data increase demands on database connection counts and cache capacity. Adjust connection pool parameters during upgrades to avoid service freezes. Batch reports and shift handover records generated per shift and per day require support for batch import and structured chunking. Ensure compatibility of existing document processing logic with the long-text structure of refining scenarios during upgrades. The multi-unit coupled business characteristics also require configuration of department-level data permission isolation during deployment. Complete full data backup before upgrade operations to avoid business interruptions.

How to set the configurations

Configuration ItemRecommended ValueRationale
DB_MAX_LINK80–120 connectionsAdapt to high-frequency access demands of real-time process data and batch reports, avoid database connection exhaustion
MONGODB_URIPoint to a dedicated database instance that synchronizes DCS, LIMS and tank farm metering dataIsolate business-specific data from general data, improve retrieval and storage efficiency
REDIS_URLPoint to an enterprise intranet dedicated cache instanceCache real-time process parameters and daily quality reports, reduce database query pressure
STORAGE_S3_ENDPOINTIntranet access address of enterprise internal object storageAdapt to offline deployment scenarios without external networks, store batch-imported documents and operation logs
ROOT_KEYRandom key string generated by the security teamEnsure permission security of system background operations, comply with safety management requirements of refining enterprises

Three common mistakes

  • Symptom: After upgrading FastGPT v4.17.0 to v4.6.8, modifying the configuration file associated with MONGODB_URI and restarting the service results in a login failure prompt, with the interface returning a 500 status code. Cause: The connection parameters of MONGODB_URI were not verified for correctness. Configuration modifications accidentally deleted database authentication fields or port configurations, causing the service to fail to connect to the database.
  • Symptom: When attempting an offline upgrade, official image packages cannot be pulled, and the deployment process gets stuck at the image pull step. Cause: The image packages required for the upgrade were not uploaded to the enterprise intranet image repository in advance. Upgrade scripts that rely on external networks cannot complete image loading.
  • Symptom: Attempting recovery after a failed upgrade only backs up image files and database data. After startup, batch-imported distillate export quality reports are found to be missing. Cause: Document data in the file storage directory was not backed up synchronously. Backing up only images and databases will result in loss of unstructured document storage information.

How to confirm configurations are properly set

  • Execute a database connection test command to verify whether the connection count set by DB_MAX_LINK meets the concurrent demands of current data synchronization. Adjust the value based on real-time data access volume.
  • Upload a typical distillate export quality report document to trigger the RAG chunking and retrieval process, confirm that the document can be correctly indexed and recalled.
  • Check the configuration of STORAGE_S3_ENDPOINT, attempt to upload a test log file, confirm that the intranet storage service can perform normal read and write operations.
  • Restart the service, use the background permission test page to verify that the key set by ROOT_KEY can normally verify background operation permissions.

The values provided here are common starting points, and should be evaluated against the actual operational samples of the target deployment environment.