Reference only; verify against the target FastGPT release and deployment documentation.
What this category of data looks like
The source data for survey and design ledgers includes project approval documents, field survey records, design drawing metadata, approval workflow documents, and more. Data update rhythm is adjusted based on project phases. Batch updates are triggered during the preliminary design, construction drawing design, and completion phases, while daily changes are pushed in real time. A single ledger document contains fields such as project number, survey point latitude and longitude, material specification parameters, and approval node time. Units include decimal latitude and longitude, millimeters, megapascals, YYYY-MM-DD formatted time, and more. Some documents include multi-page survey report attachments. The data structure includes both structured fields and unstructured text.
What constraints these characteristics impose on the database and operations link
The multi-type fields of survey and design ledgers require the database to support both structured relational storage and unstructured document storage, which increases the complexity of database selection and configuration. Frequent phased batch updates and real-time change pushes will cause peak fluctuations in database connection requests. Reasonable connection pool parameter configuration is needed to avoid connection exhaustion. Attached large-volume survey report attachments will increase database storage capacity requirements, and disk space matching project scale must be reserved. Associated queries for spatial coordinate fields also require the database to be configured with corresponding spatial indexes to ensure query efficiency.
How to set the configurations
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
MONGODB_URI | mongodb://fastgpt:example value@localhost:27017/fastgpt?authSource=admin | Survey and design ledgers include unstructured survey report attachments and approval document metadata. MongoDB is suitable for storing flexible unstructured data |
PG_URL | postgresql://fastgpt:example value@localhost:5432/cems?sslmode=require | Structured data such as project numbers, point coordinates, and material parameters require a relational database to ensure transaction consistency and associated query efficiency |
DB_MAX_LINK | 20–30 connections | The ledger update frequency for survey and design projects is high. This range can cover peak connection demand and avoid request queuing |
REDIS_URL | redis://:example value@localhost:6379/0 | Can cache repeated ledger summary query requests, reducing repeated database query pressure, corresponding to repeated query optimization requirements |
Three common mistakes
- An "unsupported wire version" or "AVX instruction set not found" error appears after startup, and the container cannot start normally. The cause is using a MongoDB 5.x version image, while the host CPU does not support the AVX instruction set, and the compatible lower version image was not replaced.
- When the same ledger summary request is initiated repeatedly, the response time does not shorten significantly, and the database log shows the same query statement being executed multiple times. The cause is that
REDIS_URLis not configured or the cache rule does not take effect, and the repeated query cache mechanism is not enabled. - Drawing links in the ledger cannot jump normally, or associated queries return empty results. The cause is mistakenly storing links in an unstructured collection in MongoDB, and no associated field was established in the structured table in PostgreSQL, resulting in failed associated queries.
How to confirm the configuration is complete
- Run the
docker pscommand to confirm that the MongoDB, PostgreSQL, and Redis containers are all running, with no abnormal exit or restart records. - Initiate 3 identical ledger summary query requests consecutively, and observe whether the response time of the second and third requests is significantly shorter than that of the first request.
- Log in to the PostgreSQL database, check the fields and data of the structured ledger table, and confirm that fields such as project number and point coordinates are stored correctly.
- Log in to the MongoDB database, check the attachment metadata collection, and confirm that the associated information of survey report attachments is stored completely.
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.