What This Category’s Data Looks Like
Iron ore yield-related data is primarily sourced from the official market data API of Dalian Commodity Exchange and structured third-party bulk commodity information APIs. Real-time transaction and market data is pushed every 1 minute between 9:00 and 23:00 on trading days. A full daily yield snapshot document is generated after market close each day. Each data entry uses structured JSON format, containing fields such as contract identifier, trading date, settlement price, position volume, and daily yield change value. Settlement price uses the unit yuan per wet metric ton, position volume uses the unit lot, and yield change value is a dimensionless relative change value.
Constraints Imposed on Database and Operations Workflows
High-frequency real-time data pushes require the database connection pool to be configured with sufficient concurrent connections to avoid write blocking. Full daily snapshot generation after market close requires enabling bulk write mode for the database to improve write efficiency. The daily_return structured field is a dimensionless relative value, so data validation rules must be configured to filter abnormal fluctuation values. Third-party data source API calls have call frequency limits, so current limiting and retry strategies must be configured. For scenarios where data is pulled for multiple contracts in parallel, sharded writes must be supported to avoid table locking on a single table, which disrupts overall data synchronization efficiency.
How to Configure Settings
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
DB_PORT | 27017 | Official default MongoDB port, compatible with most self-hosted database deployment scenarios |
db_connection_pool_size | 20–30 connections | Iron ore market data is pushed every 1 minute, with high concurrent write volume per batch. This value balances connection resources and concurrency efficiency |
db_batch_write_size | 500–1000 entries | Daily closing snapshot data volume is large. This value avoids single write timeout |
db_retry_max_times | 3 retries | Third-party data sources may experience occasional outages. This value fixes temporary failures without impacting real-time performance |
db_write_timeout | 10 seconds | For high-concurrency write scenarios, 10 seconds covers most network latency and database lock wait times |
db_schema_validation_enabled | Enabled | Validation of abnormal values in the daily_return field is required to prevent dirty data from being written |
The parameter values provided on this page are general recommendations used as a starting point for configuration. Actual values are affected by material form, data volume, and business rules. Each scenario requires specific analysis. Testing on local samples prior to finalization is advised.
Three Common Configuration Errors
- Issue: Database connection nodes do not accept port number input; interface input boxes are grayed out or unresponsive. Cause: FastGPT v4.14.0 and later versions integrate database port configuration into environment variables. Workflow nodes no longer offer interactive manual port input.
- Issue: Workflow calls to database APIs return 503 status codes, with concurrent requests rejected. Cause:
db_connection_pool_sizeandworkflow_api_concurrency_limitare not configured. The default concurrency threshold is insufficient to support write requests for iron ore high-frequency data. - Issue: After starting FastGPT v4.14.9, the
mongo/datafolder is not created in the current working directory. Cause: This version configures the MongoDB data directory as an in-container path by default. For self-hosted deployments, the mount directory must be specified manually. No local folder is created automatically if no configuration is provided.
How to Verify Proper Configuration
- Call the database connection test API to check if daily yield data for the specified contract can be pulled normally. Verify that the returned fields match the preset
instrument_id,trade_date, anddaily_return. - Submit simulated iron ore market data, review database write logs for no errors, and confirm that bulk write functionality operates correctly.
- Simulate concurrent database write requests, observe response statuses, and adjust concurrency thresholds based on business peak loads until requests experience no timeouts or rejections.
- Check the MongoDB data directory to confirm that the
mongo/datafolder has been created per configuration, and that historical data files for relevant contracts are present.
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-14.