What this category of data looks like
Data related to equipment inspection and maintenance Q&A for pharmaceutical dosage form manufacturing comes from approved prescription processes, material batches, MES electronic batch records, equipment and environment monitoring systems, LIMS, and quality management systems. Daily associated documents include master production files, batch production records, batch packaging records, cleaning records, inspection records, deviation/CAPA/change documents, and batch release review forms. Data updates align with production batches, key process steps, and monitoring plan execution. It covers business requirements of production, quality assurance, quality control, warehousing, and other departments.
What constraints these characteristics impose on the deployment and upgrade phase
Data sources cover multiple production and quality systems, and updates change dynamically with production batches. Stable database connection pools must be configured during deployment to avoid connection exhaustion during bulk data synchronization or concurrent queries. Associated documents must comply with GMP compliance requirements. Data encryption and access auditing must be enabled during deployment to ensure all operation logs are traceable. Dynamic expansion resources must be reserved during the upgrade process to handle high concurrent query demands during peak production periods. Post-upgrade configurations must not affect associated queries of existing batch records.
How to set the configurations
These configurations are based on FastGPT v4.17.0.
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
DB_MAX_LINK | 100–150 connections | Adapts to concurrent queries of equipment inspection and maintenance data across multiple departments, avoiding database connection exhaustion |
MONGODB_URI | mongodb://username:password@host:port/dbname?authSource=admin | Stores equipment maintenance logs and batch record associated data; requires correct authentication information and database instance configuration |
REDIS_URL | redis://:password@host:port/0 | Caches frequently queried equipment inspection rules and common maintenance solutions to reduce database access pressure |
STORAGE_S3_ENDPOINT | s3-cn-east-1.amazonaws.com | Stores large files such as equipment drawings and maintenance videos, meeting GMP-compliant file traceability and storage requirements |
FE_DOMAIN | https://fastgpt.manufacture-pharma.com | Configures the official access domain name to ensure normal interface calls from internal production and quality systems |
ROOT_KEY | Generate a random string in accordance with enterprise compliance requirements | Configures the super administrator permission key, only used for initial deployment, not exposed publicly during daily operations |
Three common mistakes
- Symptom: Login errors occur after re-pulling the image, with prompts "invalid authentication information" or "unable to connect to authentication service". Cause: The original deployment's
ROOT_KEYor database connection configuration was not retained, causing the new image to fail to match the original authentication system. - Symptom: Equipment maintenance-related document data fails to load after deployment, returning empty results or 404 errors. Cause:
STORAGE_S3_ENDPOINTor storage permissions were not configured correctly, making it impossible to access GMP-related equipment documents. - Symptom: Timeout errors occur during concurrent queries, returning 504 gateway timeout status code. Cause:
DB_MAX_LINKwas not set reasonably, causing the database connection pool to be exhausted and unable to handle simultaneous requests from multiple departments.
How to confirm configurations are correct
- Run a database connection test to verify the connectivity of the
MONGODB_URIandREDIS_URLconfigurations, confirming that historical equipment inspection data can be read. - Upload a test equipment maintenance document to verify that the storage and reading functions of the
STORAGE_S3_ENDPOINTconfiguration work properly. - Initiate multiple concurrent equipment inspection query requests to confirm that the
DB_MAX_LINKconfigured connection count can support concurrent demands, with no connection exhaustion errors. - Access the domain name configured in
FE_DOMAINto confirm that the interface loads normally and can call related APIs.
The values given are common starting points and should be measured against the reader's own samples.