Troubleshooting
Common issues and solutions when using Tembo AI agent
Common Issues and Solutions
Integration Problems
Sentry Connection Issues
Problem: Sentry integration shows “connection failed” or no errors are being imported.
Solutions:
- Check OAuth Authorization: Ensure you’ve granted all required permissions during the OAuth flow
- Verify Project Mappings: Each Sentry project must be mapped to a GitHub repository
- Webhook Delivery: In Sentry, check Developer Settings → Webhooks for delivery status
- Error Frequency: Tembo only processes errors seen more than once (
times_seen:>1
)
PostgreSQL Connection Problems
Problem: Database connection fails or times out.
Solutions:
- Test Connection String: Verify your connection string works with
psql
: - Check Firewall Rules: Ensure port 5432 (or your custom port) is accessible
- SSL Configuration: Match SSL settings between your database and connection string
- User Permissions: Verify the database user has required permissions:
GitHub Integration Issues
Problem: Pull requests are not being created or pushed to the wrong repository.
Solutions:
- Repository Access: Ensure Tembo has write access to the target repository
- Branch Protection: Check if branch protection rules are preventing PR creation
- Repository Mapping: Verify integration sources are mapped to correct repositories
- Personal Access Token: Ensure GitHub tokens haven’t expired (if using personal tokens)
Issue Detection Problems
No Issues Being Detected
Problem: Tembo shows no detected issues despite having performance problems.
Possible Causes & Solutions:
Missing pg_stat_statements:
Query Thresholds Not Met:
- Slow queries must have >5 calls and >100ms mean execution time
- Check your query patterns:
SELECT * FROM pg_stat_statements WHERE calls > 5 ORDER BY mean_exec_time DESC;
Insufficient Permissions:
False Positive Issues
Problem: Tembo is flagging queries or code that shouldn’t be optimized.
Solutions:
-
Use .temboignore: Create a
.temboignore
file in your repository root to exclude specific files or patterns: -
Mark Issues as False Positives: In the Tembo dashboard, mark issues as “Not a Problem” to help train the AI
-
Review Query Context: Some slow queries might be intentional (like reporting queries that run infrequently)
Performance and Monitoring
Slow Issue Processing
Problem: Issues are taking a long time to be resolved or pull requests aren’t being created promptly.
Debugging Steps:
- Check Queue Status: Review the job queue in your dashboard for processing delays
- Review AI Solver Status: Ensure the AI solvers are responding correctly
- Examine Issue Complexity: Complex issues naturally take longer to resolve
- Credit Usage: Verify you haven’t hit your credit limits
Missing Monitoring Data
Problem: Dashboard shows incomplete or missing performance data.
Solutions:
-
Database Statistics Collection: Ensure
track_activities
andtrack_counts
are enabled: -
Statistics Reset: Check if statistics were recently reset:
-
Connection Monitoring: Verify Tembo can maintain persistent connections to your database
Pull Request Issues
PRs Not Being Created
Problem: Tembo detects issues and generates solutions but doesn’t create pull requests.
Troubleshooting:
- Repository Permissions: Verify write access to the target repository
- Base Branch: Ensure the default branch exists and is accessible
- File Conflicts: Check if there are uncommitted changes that might cause conflicts
- Rate Limits: GitHub API rate limits might be affecting PR creation
Poor Quality Pull Requests
Problem: Generated pull requests don’t solve the issue or introduce new problems.
Improvement Steps:
- Provide Feedback: Use PR comments to guide the AI on what needs improvement
- Add Context: Ensure your repository has good documentation and clear code patterns
- Review Patterns: Look for patterns in poor solutions and provide feedback through the dashboard
- Custom Instructions: Consider adding a
.tembo/instructions.md
file with project-specific guidance
Best Practices for Troubleshooting
Enable Detailed Logging
For PostgreSQL monitoring:
Regular Health Checks
- Weekly Reviews: Check the Tembo dashboard weekly for any stuck issues or integration problems
- Monitor Integration Status: Verify all integrations show “Connected” status
- Review Recent PRs: Examine recent pull requests for quality and accuracy
- Check Credit Usage: Monitor your credit consumption to avoid service interruptions
Getting Help
If you continue experiencing issues:
- Check Status Page: Visit our status page for known issues or maintenance
- Review Documentation: Ensure you’re following the latest setup instructions
- Contact Support: Use the support chat in your Tembo dashboard with:
- Specific error messages
- Screenshots of the issue
- Your organization ID
- Steps to reproduce the problem
Performance Optimization Tips
Database Monitoring Efficiency
- Use connection pooling for high-traffic databases
- Configure appropriate
shared_preload_libraries
for monitoring extensions - Regularly update table statistics:
ANALYZE;
- Monitor
pg_stat_statements
for storage growth and reset when needed
Integration Optimization
- Map only active repositories to reduce noise
- Configure appropriate issue severity thresholds
- Use
.temboignore
files to exclude irrelevant code - Regularly review and clean up outdated integrations