Process Document and Exception Report Drafting for Petroleum Refining: Deployment and Upgrade

Data for petroleum refining scenarios comes from DCS/APC control systems, LIMS laboratory systems, tank farm metering systems, crude oil evaluation

What data for this category looks like

Data for petroleum refining scenarios comes from DCS/APC control systems, LIMS laboratory systems, tank farm metering systems, crude oil evaluation databases, equipment management systems, and energy management systems. Daily generated documents include operating procedures, production plans, material balance reports, distillate export quality reports, interlock ledgers, shift handover records, and change management files. Data update rhythms are divided into real-time, per-shift, and daily. Document fields cover crude oil properties, multiple unit load parameters, product fraction indicators, interlock trigger records, and more. Units include industrial standard units such as temperature, pressure, flow, and component proportion.

What constraints these characteristics impose during deployment and upgrade

Petroleum refining scenario data is multi-source, heterogeneous, and has highly varied update rhythms. During deployment, access protocols for multiple industrial systems such as DCS/APC and LIMS must be adapted to avoid data synchronization interruptions. Document types cover multiple formats including reports, ledgers, and records. Fields include complex industrial parameters and associated logic. During upgrades, existing document parsing rules must be retained to prevent field extraction failures. Multiple continuous production units are coupled through logistics and energy networks, with strong data correlation. During deployment, data consistency check logic must be configured. During upgrades, data links must be maintained without interruption to avoid abnormal process parameters. This explanation is based on the deployment logic of FastGPT v4.17.0.

How to set configurations

Configuration ItemRecommended SettingRationale for This Setting
DB_MAX_LINK80–120Adapt to real-time data concurrent requests from multiple units, avoid exhausting the database connection pool
MONGODB_URImongodb://{user}:{pass}@{host}:{port}/refine_process?authSource=adminStore process documents, exception reports, and associated industrial data, adapt to storage requirements for multiple document types
REDIS_URLredis://:{pass}@{host}:{port}/0Cache real-time process parameters and session information, shorten response time for exception report generation
STORAGE_S3_ENDPOINTInternal enterprise object storage service addressStore large-volume documents such as original process files and laboratory reports
FILE_TOKEN_KEYRandomly generated 32-character sequenceEnsure access security for file download links
ROOT_KEYCustom high-strength secret keyRestrict access to the platform backend, prevent unauthorized operations

Three common mistakes

  • Phenomenon: The OneAPI service deployed via Docker restarts continuously and infinitely. The log displays the "connection pool exhausted" error. Cause: The DB_MAX_LINK parameter was not adjusted to meet the concurrency requirements of the refining scenario. The connection pool size is insufficient to support real-time data requests from multiple units.
  • Phenomenon: After FastGPT deployed from source code connects to a database deployed via Docker, knowledge base documents cannot be synchronized normally. Cause: The authentication source and database name in the MONGODB_URI configuration were not set correctly, so metadata records of the knowledge base cannot be read.
  • Phenomenon: After one-click deployment via Sealos, the first service call prompts insufficient resource quota. Cause: System quota parameters were not adjusted based on the document volume and concurrency of the refining scenario. The default quota is insufficient to support the processing requirements of process documents.

How to confirm the configuration is properly set

  • Run the database connection test script to confirm that the configurations of MONGODB_URI and REDIS_URL can establish normal connections, and the number of connections is not lower than the preset DB_MAX_LINK value.
  • Upload a typical petroleum refining process document, verify that the parsed fields match the industrial parameters in the original document, and confirm that the document parsing rules are effective.
  • Start the real-time data synchronization task, check that the data update frequency matches the preset real-time, per-shift, or daily rhythm, with no obvious delays.
  • Access the frontend address corresponding to FE_DOMAIN, confirm that administrator login can complete permission verification via ROOT_KEY, with no access errors.

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