Adam
06/29/2025, 10:26 PMMarvin
06/29/2025, 10:26 PMMarvin
06/29/2025, 10:28 PMpython
     from prefect import get_run_logger
     @flow
     def my_flow():
         logger = get_run_logger()
         <http://logger.info|logger.info>("Flow starting...")
         # Your flow code
         <http://logger.info|logger.info>("Flow completed")Adam
06/29/2025, 10:32 PMMarvin
06/29/2025, 10:32 PMMarvin
06/29/2025, 10:33 PMAdam
06/29/2025, 10:37 PMMarvin
06/29/2025, 10:37 PMMarvin
06/29/2025, 10:38 PMPREFECT_API_DATABASE_TIMEOUTAdam
06/29/2025, 10:42 PMMarvin
06/29/2025, 10:42 PMMarvin
06/29/2025, 10:42 PMmarkdown
Title: Documentation: Add Database Resource Requirements to Migration Guide
## Overview
When migrating from Prefect 2.x to 3.x, users need clear guidance about database resource requirements. Currently, this critical information is not prominently featured in the migration documentation, leading to potential performance issues and hanging flow runs.
## Current State
The migration guide currently covers:
- Technical steps for migration
- Architectural changes
- Database timeout settings (`PREFECT_API_DATABASE_TIMEOUT`)
## Proposed Additions
### 1. Database Requirements Section
Add a new section titled "Database Requirements and Sizing" that includes:
#### Resource Requirements
- Minimum recommended database specifications
- Comparison of resource usage between 2.x and 3.x
- Warning about common instance types that may be insufficient (e.g., db.t4g.small)
#### Common Symptoms of Undersized Databases
- Flow runs appearing to hang in "Running" state
- Delayed state transitions
- Inconsistent UI updates
- Database timeout errors
#### Recommended Specifications
- Development: Minimum specifications for development/testing
- Production: Recommended specifications based on workflow volume
  - Small deployments (<100 flows/day)
  - Medium deployments (100-1000 flows/day)
  - Large deployments (>1000 flows/day)
### 2. Troubleshooting Guide
Add a subsection specifically for database-related issues:
- How to identify database resource constraints
- Monitoring metrics to watch
- Steps to upgrade database resources
- Temporary workarounds for resource constraints
## Why This Matters
This addition will:
1. Help users plan migrations more effectively
2. Reduce support issues related to database sizing
3. Improve user experience during migration
4. Prevent common performance issues
## Personal Experience
As a user who migrated from 2.x to 3.x using a db.t4g.small instance, I encountered hanging flow runs due to insufficient database resources. This issue could have been avoided with clearer documentation about resource requirements.
## Additional Context
This information would be valuable in:
- Migration guide
- Self-hosted deployment guide
- Production deployment best practices
Would you like me to help implement this documentation improvement?