Inspection and Process Record Audit for Cosmetic Manufacturing: Deployment and Upgrade

The daily documents for this category include formula process sheets, weighing and feeding records, emulsification or filling records, cleaning and

What the data for this category looks like

The daily documents for this category include formula process sheets, weighing and feeding records, emulsification or filling records, cleaning and site clearance records, semi-finished and finished product inspection reports, and label review forms. Data sources include registered or filed formulas, raw material safety materials, weighing and emulsification equipment, ERP/MES systems, laboratory test results, and packaging material version records. Data updates are triggered with each production batch or each line change. Fields include restricted substance content, emulsification temperature, batch number, packaging material version number, and others. Corresponding units are percentage, degrees Celsius, string, and version number.

What Constraints These Characteristics Impose on Deployment and Upgrade

Since data is updated with each production batch and originates from multiple sources, deployment must adapt to batch synchronization logic for diverse data sources to avoid data synchronization delays. Since formulas and labels must meet filing requirements, deployment configurations must include strict data validation rules to ensure uploaded document fields are complete and compliant. Since a single production batch generates a large volume of documents, upgrades require adjusting database connection parameters to prevent service interruptions caused by exhausted connections. Since data contains sensitive formula and raw material information, deployment must configure secure storage and access permissions to prevent data leaks.

How to Set the Configurations

The following configurations apply to FastGPT v4.17.0.

Configuration ItemRecommended SettingRationale
MONGODB_URImongodb://username:password@host:port/cosmetic_prod?authSource=adminStores inspection records and formula data; specifies the authentication source to ensure secure data access
REDIS_URLredis://:password@host:6379/1Caches frequently accessed filed formulas and packaging material version data to reduce external system query frequency
DB_MAX_LINK20–30Adapts to concurrent access demands for multiple documents generated per production batch, preventing database connection exhaustion
STORAGE_S3_ENDPOINTFill in according to the enterprise's internal object storage addressStores large files such as cleaning records and inspection reports, adapting to the enterprise's existing storage architecture
FE_DOMAINhttps://cosmetic-manufacture.your-domain.comConfigures the frontend access domain name to ensure normal interactive response of the workflow canvas

Three Common Mistakes

  • Symptom: After an upgrade, user IDs cannot be retrieved via the URL-spliced userId parameter, and logs show the userId field is empty. Cause: The default tmbId parameter logic has changed, and the settings related to userId pass-through have not been enabled in the deployment configuration.
  • Symptom: Resource usage differs significantly between Docker deployment and Sealos deployment. Workflow node drag delay is higher in Sealos deployments. Cause: The default container resource limits for Sealos deployment do not adapt to the demands of multi-data-source synchronization, and parameters such as DB_MAX_LINK have not been adjusted.
  • Symptom: Workflow canvas node dragging is laggy, with single-node loading delay exceeding 5 seconds. Cause: The DB_MAX_LINK parameter has not been adjusted, database connection exhaustion causes query delays, and the performance optimization logic included in FastGPT v4.17.0 has not been implemented.

How to Verify Configurations Are Correct

  • Run a database connection test to verify that the MONGODB_URI and REDIS_URL configurations can establish normal connections, and check whether the current connection count falls within the range specified by DB_MAX_LINK.
  • Upload a cosmetic formula process sheet, confirm that restricted substance and raw material dosage fields in the formula are parsed correctly, and verify that the data synchronization logic functions properly.
  • Configure the callback address for enterprise WeChat or Feishu, trigger an approval synchronization for an inspection record, and check whether status updates are received normally.
  • Open the workflow canvas, drag multiple nodes, observe whether the response delay meets expectations, and verify that the FE_DOMAIN configuration is active.

The values provided are common starting points and should be evaluated against the reader's own samples.