What Data Looks Like for This Category
Production ledger data for SMT mounting and electronic assembly includes two core types of content. The first type is process documents: customer-provided BOMs, Gerber coordinate files, line change lists, stencil and reflow oven temperature records, and first article inspection reports. The second type is production process data, collected from MES systems, mounters, SPI/AOI inspection equipment, and reflow ovens. This data includes solder paste batches, component batches, placement positions, reflow temperature curves, defect positions, and more. The system syncs data in real time for each work order and each line change. Fields include part numbers, reference designators, component serial numbers, reflow temperature parameter values, and more. Units include millimeters, degrees Celsius, piece counts, and others.
Constraints Imposed on Deployment and Upgrade
Multi-source heterogeneous data, high-frequency real-time updates, and archiving requirements impose clear constraints on FastGPT deployment and upgrade. Connecting to data from multiple devices and systems requires configuring parsing rules that support multiple format process documents and production data during deployment. Upgrades must retain configured field mapping logic to avoid interrupting production ledger synchronization. High-frequency real-time updates increase database connection load, requiring reasonable adjustment of connection pool parameters. Archived production ledgers and reports require stable storage service support, so reliable object storage endpoints must be configured during deployment. Core active connection configurations must not be modified during upgrades to prevent sync interruptions that impact production traceability.
How to Set Configurations
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
DB_MAX_LINK | 20–30 connections | This category uses high-frequency real-time sync, requiring sufficient database connection pool capacity to avoid connection exhaustion impacting ledger generation |
STORAGE_S3_ENDPOINT | Intranet-accessible object storage domain name | Production ledgers and reports require stable archiving; intranet access reduces latency and security risks |
PG_URL | Connection string for dedicated PostgreSQL instance | Production data for this category requires persistent storage; a dedicated instance isolates production data from other business data |
REDIS_URL | Redis instance address with persistent configuration | High-frequency updated production data requires caching intermediate sync status; persistence prevents lost progress after restart |
FILE_TOKEN_KEY | 32-character random string | Secure access tokens must be generated for uploaded process documents such as BOMs and temperature records to prevent unauthorized access |
ROOT_KEY | Set based on actual testing | This configuration controls the highest permissions for the admin backend, and must be adjusted per internal enterprise security policies |
Three Common Misconfigurations
- Phenomenon: PostgreSQL container fails to start after deployment, with logs showing “FATAL: role "postgres" does not exist”. Cause: Database initialization script was not configured correctly, or the database role specified in the
PG_URLconfiguration does not match the initialization script. - Phenomenon: After upgrading to FastGPT v4.17.0, production ledger sync tasks time out, and daily reports cannot be generated. Cause: The
DB_MAX_LINKparameter was not adjusted during upgrade; the original connection count is insufficient to support high-frequency real-time data sync, leading to connection pool exhaustion. - Phenomenon: After uploading documents such as line change lists and SPI reports, the parsing result is empty. Cause: The
FILE_TOKEN_KEYconfiguration was not set correctly, preventing the system from reading uploaded documents normally, or parsing rules for the corresponding document format were not configured.
How to Confirm Configurations Are Correct
- Run the docker-compose ps command to confirm all core containers (PostgreSQL, Redis, FastGPT services) are running, with no abnormal exits.
- Upload a test BOM file, verify that the system can parse normally and extract fields such as part number and reference designator, confirming that data source parsing configurations are active.
- Initiate a production ledger summary task, check that mounter and SPI/AOI data for the specified time period can be pulled, confirming that database connections and sync logic are working properly.
- Access the configured
FE_DOMAINaddress, confirm that the admin backend can be logged into normally, verifying connectivity between frontend configurations and backend services.
The values provided are common starting points and should be measured against the reader's own samples.