Reference only; verify against the target FastGPT release and deployment documentation.
What the data for this category looks like
Ledger data for pharmaceutical distribution primarily comes from inventory management systems, drug batch traceability platforms, and cold chain temperature and humidity monitoring terminals. Data updates are triggered by inbound and outbound batches, and full ledgers are synced daily. Each individual ledger document includes fields such as generic drug name, approval number, inbound batch, outbound quantity, storage temperature and humidity, and settlement amount. Units include box, case, piece, milligram, yuan, and others. Field details vary across different drug categories. Some cold chain drugs require additional continuous temperature and humidity record fields.
What constraints do these characteristics impose on deployment and upgrades
The multi-source, multi-field nature of pharmaceutical distribution ledgers requires configuring a stable cross-system data synchronization link during deployment, to avoid data loss caused by incorrect field mapping. The high-frequency batch-level update rhythm requires adapting database connection pool parameters to short-connection high-frequency requests, to prevent connection exhaustion. The additional temperature and humidity fields for cold chain drugs require pre-configuring custom fields during deployment, and maintaining compatibility with old field mapping rules during upgrades, to avoid parsing exceptions for existing data. The field differences across multiple drug categories require reserving field extension interfaces during deployment, and testing field parsing compatibility for different categories during upgrades, to ensure processing capability for all ledger categories.
How to configure the settings
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
DB_MAX_LINK | 200–300 | High-frequency batch-level data synchronization requests for pharmaceutical distribution ledgers require sufficient database connection pool capacity to support concurrent writes |
MONGODB_URI | mongodb://[username]:[password]@[host address]:[port]/fastgpt?authSource=admin | Stores unstructured temperature and humidity records and batch traceability data for multi-source ledgers, requires compatibility with flexible document storage formats |
REDIS_URL | redis://:[password]@[host address]:[port]/0 | Caches batch query results of ledgers and user sessions, reduces high-frequency access pressure on the database |
STORAGE_S3_ENDPOINT | Configured according to the regional endpoint provided by the cloud service provider | Stores batch-uploaded ledger scan files and temperature and humidity monitoring logs, needs to adapt to cross-region storage requirements |
ROOT_KEY | Custom high-strength random string, no less than 32 characters in length | Manages the highest-privilege access to the FastGPT backend, requires ensuring post-deployment backend security |
FE_DOMAIN | Public IP of the deployment server or bound secondary domain name | Configures the frontend access entry, adapts to the internal office network access rules of pharmaceutical distribution scenarios |
Three common misconfigurations
- Phenomenon: After starting the container, the 3000 port cannot be accessed, and the page returns a 502 status code or fails to load resources. Cause: The port mapping configuration in docker-compose.yml is not synchronized with the server security group rules, or
FE_DOMAINis not correctly configured as the server public address or internal office domain name. - Phenomenon: After uploading a pharmaceutical ledger PDF, temperature and humidity and batch fields cannot be extracted. Cause: Custom field mapping rules were not configured before deployment, or
FILE_TOKEN_KEYwas not correctly generated, resulting in insufficient file parsing permissions. - Phenomenon: A timeout error occurs when calling the ledger aggregation interface. Cause: The
DB_MAX_LINKconfiguration value is too low, the database connection pool is exhausted, and cannot handle high-frequency batch-level data query requests.
How to verify a successful configuration
- Run the docker ps command, confirm that the FastGPT container is in the running state, and port 3000 is correctly mapped to the host port.
- Access the backend address of
FE_DOMAIN, log in to the system usingROOT_KEY, and verify whether the connection status of the database, cache and storage services is normal. - Upload a standard pharmaceutical ledger PDF, verify whether the field extraction function can correctly identify drug names, batches and temperature and humidity information.
- Initiate a batch ledger data synchronization request, confirm that the database connection pool does not have exhaustion errors, and the synchronization task is completed normally.
The values provided are common starting points and should be measured against the reader's own samples.
Question material comes from public community discussions. Configuration values are common starting points and should be measured against your own samples. Verified on 2026-09-28.