Online Troubleshooting and Retrospective for IT Procurement and Supplier Management: Database and Operations

Data for this category primarily comes from procurement systems, supplier quotes, budget sheets, and contract systems. Daily associated documents

What the data for this category looks like

Data for this category primarily comes from procurement systems, supplier quotes, budget sheets, and contract systems. Daily associated documents include procurement requests, comparison records, contracts, and acceptance documents. Common data fields include purchase order number, supplier name, budget amount, contract term, and acceptance status. Units include yuan, days, and others. The data update rhythm follows per-order or monthly cycles. The volume of data updated in a single operation varies with procurement process nodes, ranging from a single request to bulk monthly reconciliation data. Overall concurrent access volume is low, with bulk writes and scheduled queries as the primary access patterns.

Multi-source data access requirements demand that databases support mixed storage of structured and unstructured data, adapting to PostgreSQL and MongoDB storage scenarios respectively. The per-order or monthly update rhythm means databases do not need high-concurrency real-time write configurations. Batch submission or scheduled synchronization strategies can be adopted. Data linked to full procurement process documents requires database table structures to match field specifications of procurement requests, contracts and other documents, to avoid missing fields or inconsistent formats. Error consequences include risks such as procurement delays and budget overruns, so databases need reliable backup and recovery mechanisms to enable fast data recovery during fault scenarios. Unnecessary external access must also be restricted to ensure the security of internal procurement data.

How to set the configurations

These configurations apply to FastGPT v4.17.0.

Configuration ItemRecommended ValueRationale
MONGODB_URImongodb://admin:password@192.168.1.100:27017/fastgpt_purchase?authSource=adminConnects to the MongoDB repository for procurement contract systems, adapting to unstructured contract text and acceptance document data
PG_URLpostgresql://purchase_user:pass123@192.168.1.101:5432/purchase_dbConnects to the PostgreSQL database for supplier quotes and budget sheets, adapting to structured comparison and budget data queries
DB_MAX_LINK20–30 connectionsProcurement data update frequency follows per-order or monthly cycles, so concurrent connection requirements are not high. This setting avoids excessive occupation of server resources
REDIS_URLredis://:redis_pass@192.168.1.102:6379/0Caches approval status of procurement requests, reducing response latency for frequent queries

Three common mistakes

  • Symptom: After performing a version upgrade, the page returns a 502 error and the system cannot be logged into. Cause: After modifying the configuration file for MONGODB_URI or PG_URL, the service was not restarted correctly, or the configuration parameter format was incorrect, leading to database connection failure.
  • Symptom: When performing a version upgrade in an offline environment, a prompt appears indicating missing dependency packages or database connection failure. Cause: The offline installation package for the corresponding version was not downloaded in advance, and the database image and data were not fully backed up to local storage media, resulting in inability to read necessary configurations and data during the upgrade process.
  • Symptom: Queries for supplier comparison records return empty results or abnormal formats. Cause: The database connection parameters were incorrectly replaced, or database access permissions were not configured correctly, leading to inability to read structured comparison data, or the read data fields did not match expected values.

How to confirm the configuration is complete

  • Run the built-in FastGPT database connection test tool to verify that configuration items including MONGODB_URI, PG_URL, and REDIS_URL can establish normal connections, with no timeout or permission error messages.
  • Submit a simulated procurement request to check whether data is correctly written to the corresponding database table, and whether fields match the structural requirements of the procurement request document.
  • Check whether the Redis cache for procurement approval status can be updated and read normally, with no system logs indicating cache expiration or write failure.
  • View the system monitoring panel to confirm that the number of database connections does not exceed the set value of DB_MAX_LINK, with no alarm messages for connection exhaustion.

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-10-19.