sling-troubleshooting
2
总安装量
2
周安装量
#70529
全站排名
安装命令
npx skills add https://github.com/slingdata-io/slingdata-ai --skill sling-troubleshooting
Agent 安装分布
opencode
2
claude-code
2
github-copilot
2
codex
2
mcpjam
1
iflow-cli
1
Skill 文档
Troubleshooting
Common issues and solutions when using Sling.
Connection Issues
Connection Refused
Error: failed to connect to database
Solutions:
- Check host/port accessibility:
telnet host port - Verify firewall rules allow traffic
- Confirm database is running
- Check for VPN requirements
Authentication Failed
Error: authentication failed for user
Solutions:
- Verify username and password
- Check user has required permissions
- Review database authentication logs
- Confirm SSL/TLS settings match
SSL/TLS Errors
Error: SSL certificate problem
Solutions:
- For testing: add
sslmode=disable(not for production) - Verify certificate validity
- Check SSL configuration matches server
- Ensure CA certificates are available
Test Connection
# Via CLI
sling conns test MY_CONN --debug
# Via MCP
{"action": "test", "input": {"connection": "MY_CONN", "debug": true}}
Replication Issues
Table Not Found
Error: table "schema.table" does not exist
Solutions:
- Discover available tables:
sling conns discover MY_CONN --pattern "schema.*" - Check case sensitivity (some DBs are case-sensitive)
- Verify user has SELECT permission
Type Conversion Errors
Error: cannot convert value to target type
Solutions:
- Add explicit type casting:
columns: problematic_col: string transforms: - problematic_col: 'cast(value, "integer")' - Handle nulls:
transforms: - amount: 'coalesce(value, 0)' - Clean data:
transforms: - value: 'replace(value, "[^0-9]", "")'
Primary Key Violations
Error: duplicate key value violates unique constraint
Solutions:
- Verify primary key is correct
- Check for duplicate source data
- Use
mode: full-refreshto replace data - Deduplicate in source query
Memory Issues
Error: out of memory processing large dataset
Solutions:
- Reduce batch size:
env: SLING_BATCH_SIZE: 5000 - Enable chunking:
source_options: chunk_size: 6h - Use file splitting:
target_options: file_max_rows: 100000 - Reduce parallelism:
env: SLING_THREADS: 2
Performance Issues
Slow Performance
Database sources:
- Increase threads:
env: SLING_THREADS: 10 - Enable bulk loading:
target_options: use_bulk: true - Use incremental mode instead of full-refresh
File sources:
- Use parallel file processing:
env: SLING_THREADS: 20 - Compress output files:
target_options: compression: snappy
High Memory Usage
- Stream large tables with chunking
- Reduce batch sizes
- Process fewer concurrent streams
Debug Options
Enable Debug Logging
# CLI
sling run -r replication.yaml --debug
# MCP
{"action": "run", "input": {"file_path": "...", "env": {"DEBUG": "true"}}}
Enable Trace Logging
sling run -r replication.yaml --trace
Validate Configuration
# Parse only (no execution)
sling run -r replication.yaml --parse
# Or via MCP
{"action": "parse", "input": {"file_path": "replication.yaml"}}
API Spec Issues
Rate Limiting
Error: 429 Too Many Requests
Solutions:
- Reduce request rate:
defaults: request: rate: 1 # Requests per second - Configure retry:
response: rules: - action: retry condition: response.status == 429 max_attempts: 5 backoff: exponential
Authentication Errors
Error: 401 Unauthorized
Solutions:
- Verify API credentials
- Check token expiration
- Confirm required scopes
- Test with curl first
Pagination Loops
API keeps returning same data.
Solutions:
- Check pagination stop_condition
- Verify cursor/offset updates correctly
- Debug with limit:
response: records: limit: 100 # Stop after 100 records
File Issues
File Not Found
Error: file not found
Solutions:
- Check file path exists
- Verify connection configuration
- Confirm user has read access
- Check for typos in path
Encoding Errors
Error: invalid character encoding
Solutions:
- Specify encoding:
source_options: encoding: utf8 # or latin1, windows1252 - Clean source data
Format Detection Failed
Solutions:
- Explicitly set format:
source_options: format: csv header: true delimiter: ','
Error Recovery
Resume Failed Replications
Sling tracks progress automatically. Re-run to resume.
Retry Configuration
env:
SLING_RETRIES: 3
SLING_RETRY_DELAY: 60s
Run Specific Streams
# CLI
sling run -r replication.yaml --select "failed_table"
# MCP
{"action": "run", "input": {"file_path": "...", "select_streams": ["failed_table"]}}
Getting Help
- Debug output: Run with
--debugor--trace - Parse first: Validate config before running
- Test connections: Always test before replicating
- Check logs: Review database/API logs
Support Channels
- Docs: https://docs.slingdata.io
- Discord: https://discord.gg/q5xtaSNDvp
- GitHub Issues: https://github.com/slingdata-io/sling-cli/issues
- Email: support@slingdata.io