Debug and fix Sling connection, replication, and API issues. Use when encountering errors, debugging connection failures, fixing authentication problems, resolving type conversion issues, handling memory/performance problems, or troubleshooting API rate limits.
Install
npx skillscat add slingdata-io/slingdata-ai/sling-troubleshooting Install via the SkillsCat registry.
SKILL.md
Troubleshooting
Common issues and solutions when using Sling.
Connection Issues
Connection Refused
Error: failed to connect to databaseSolutions:
- 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 userSolutions:
- Verify username and password
- Check user has required permissions
- Review database authentication logs
- Confirm SSL/TLS settings match
SSL/TLS Errors
Error: SSL certificate problemSolutions:
- 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 existSolutions:
- 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 typeSolutions:
- 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 constraintSolutions:
- 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 datasetSolutions:
- 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 --traceValidate 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 RequestsSolutions:
- 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 UnauthorizedSolutions:
- 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 foundSolutions:
- Check file path exists
- Verify connection configuration
- Confirm user has read access
- Check for typos in path
Encoding Errors
Error: invalid character encodingSolutions:
- 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: 60sRun 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