What this category's data looks like
Data for this category primarily originates from raw fiber inspection, ERP systems, spinning and weaving machine operation data, evenness testers, fabric inspectors, and order specification documents. Daily stored records include cotton blending or ingredient lists, process setup sheets, equipment operation logs, yarn inspection reports, grey fabric inspection reports, and defect record sheets. Data updates are synchronized with each batch of raw materials, each shift’s production, and each piece of fabric produced. Individual documents include fields such as fiber metrics, spinning twist, weaving structure parameters, defect types and locations, with units including twists per meter, centimeters, and other standard units.
What constraints this category's characteristics impose on deployment and upgrade
This category has high-frequency data updates, synchronized with each raw material batch, each shift’s production, and each piece of fabric produced. During deployment, storage configurations must support high-frequency incremental synchronization to avoid full indexing slowing down retrieval speed. Document types include structured ingredient lists, semi-structured defect records, and unstructured process descriptions, so deployment must support multi-format parsing compatibility. Production parameters and defect data are tightly bound to production batches. During upgrades, the associated retrieval logic for historical batches must be retained to avoid disrupting traceability queries for past process data. Single-batch data volume increases with the number of machine heads, so reasonable storage expansion space must be reserved.
How to set the configurations
This guide adapts to FastGPT v4.17.0 deployment and upgrade workflows. The following configuration items must be adjusted based on the business characteristics of this category:
| Configuration Item | Recommended Setting | Rationale |
|---|---|---|
MONGODB_URI | mongodb://username:password@host:port/fastgpt_spinning?authSource=admin | Stores unstructured data such as process documents and inspection records, uses a dedicated business database to avoid confusion with other business datasets |
PG_URL | postgresql://username:password@pg-host:5432/fastgpt_spinning | Stores structured data such as system configurations and user permissions, uses a dedicated PostgreSQL database |
REDIS_URL | redis://:your_password@redis-host:6379/1 | Caches high-frequency retrieved process parameters and production batch associated data, isolates business cache by assigning database index 1 |
DB_MAX_LINK | 20–30 concurrent connections | Adapts to the concurrent demands of high-frequency data updates and retrieval for this category, avoids connection pool exhaustion disrupting production environment queries |
STORAGE_S3_ENDPOINT | http://local-s3-endpoint:9000 | Stores attachments such as batch-uploaded equipment operation records and defect photos, matches the access address of the local object storage service |
ROOT_KEY | Custom 32-character random string | Configures the highest permission key for the system backend, used to initialize administrator access after deployment |
Three common configuration mistakes
- Issue: After deploying via docker-compose and modifying the config.json configuration, the front-end model list does not update synchronously. Cause: The corresponding service container was not restarted, so configuration changes did not take effect.
- Issue: An error is triggered when clicking the knowledge base module, and the interface returns a 500 status code. Cause:
PG_URLorMONGODB_URIwas not configured correctly, resulting in database connection failure. - Issue: No front-end output is displayed after the Q&A process ends, and full content can only be viewed by entering the detail page. Cause:
FE_DOMAINwas not configured correctly, so the front end cannot receive streaming response content pushed by the back end.
How to confirm the configuration is valid
- Check the service container’s running logs to confirm there are no errors for database connections and cache service connections.
- Upload a process setup sheet document to verify that the system can correctly extract core fields such as spinning twist and weaving structure parameters.
- Initiate a retrieval request for defect records to confirm that results can be filtered by production batch.
- Initiate a complete Q&A process to confirm that the front end can normally display output content without needing to enter the detail page for viewing.
The values provided are common starting points and should be measured against the reader's own samples.