What the data for this category looks like
Data for this category comes from regulatory standards, online environmental monitoring equipment, gas detectors, personnel qualification files, equipment isolation lists, and supervision platforms. Daily documents include risk identification records, work tickets such as hot work, confined space work, and lifting work, environmental monitoring records, hazardous waste ledgers, and accident and hidden danger rectification reports. Data updates are submitted in real time upon completion of a single operation, according to monitoring cycles, or during regular inspections. This covers compliance and risk control links across the entire operation workflow.
What constraints these characteristics impose during deployment and upgrade
Data sources for this category are scattered, covering multiple types of systems such as equipment, personnel, and supervision platforms. Configure adaptation rules for multi-source data access during deployment. Work-related document formats are inconsistent. Preset parsing and field extraction logic for multiple file types in advance. Complete data updates in real time upon operation completion or submit updates periodically. Ensure storage and cache stability to support high-frequency calls. Link data across the entire operation workflow. Clarify permission isolation and audit links during deployment to ensure traceability of audit processes. During upgrades, support migration of historical data such as existing work tickets and monitoring records to avoid interrupting daily compliance audits.
How to set configurations
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
MONGODB_URI | mongodb://ehs_user:ehs_pass@mongodb-host:27017/ehs_db?authSource=admin | Stores structured compliance documents such as work tickets and monitoring records, specifies authentication source and dedicated business database |
REDIS_URL | redis://:redis_pass@redis-host:6379/0 | Caches frequently accessed personnel qualification and equipment isolation list data, uses database 0 to isolate business cache |
STORAGE_S3_ENDPOINT | https://s3-cn-beijing.volces.com | Stores unstructured files such as gas detection reports and hazardous waste ledgers, adapts to the access address of the cloud storage service provider |
DB_MAX_LINK | 20–30 connections | Limits the number of database connections when processing work audit requests concurrently to avoid resource exhaustion, adapts to high-frequency operation scenarios |
FILE_TOKEN_KEY | Randomly generated 32-bit string | Encrypts access tokens for documents such as work tickets and monitoring records, prevents unauthorized access to compliance documents |
PG_URL | postgresql://ehs_admin:pg_pass@pg-host:5432/ehs_audit | Stores compliance audit logs and hidden danger rectification closed-loop data, uses PostgreSQL to ensure transaction consistency |
Three common mistakes
- Scenario: The reranker service deployed via Docker reports a successful call but returns false. The cause is incorrect configuration of the
REDIS_URLauthentication parameter, which prevents cached retrieval results from being properly associated and verified. - Scenario: After upgrading to a specified version, official update instructions cannot be found. The cause is failure to obtain version change information via the FastGPT official release page, and directly pulling the image without verifying version logs.
- Scenario: API calls to nested knowledge base workflows return empty values. The cause is failure to adjust the connection limit in the
DB_MAX_LINKconfiguration, which exhausts database connections during concurrent requests and prevents return of compliance verification results.
How to confirm proper configuration
- For FastGPT v4.17.0, run a curl command to test connectivity to
MONGODB_URI, verify read/write permissions for work ticket data, and confirm that connection counts match theDB_MAX_LINKconfiguration. - Upload a hot work ticket and a gas detection report, verify that the
STORAGE_S3_ENDPOINTfile upload and download functions work normally, and confirm that unstructured document storage complies with requirements. - Start a test workflow, call the audit interface of the nested knowledge base, check whether the returned results include compliance verification fields, and confirm that the
REDIS_URLcache function supports high-frequency requests normally. - View system logs, confirm that access tokens generated via
FILE_TOKEN_KEYcan properly decrypt file links, and that no unauthorized access errors occur.
The values provided are common starting points and should be measured against individual deployment samples.