Troubleshooting¶
Solutions to common issues when using Pyreload.
File Watching Issues¶
Changes Not Detected¶
Symptoms: File changes don't trigger restarts
Solutions:
-
Enable verbose mode to see what's being watched:
-
Check ignore patterns:
-
Try polling mode:
-
Check file system events:
Too Many File Changes Detected¶
Symptoms: Application restarts constantly
Solutions:
-
Add ignore patterns:
-
Increase restart delay:
-
Watch specific directories:
File System Limit Errors¶
Error: OSError: inotify watch limit reached
Solution (Linux):
# Temporary fix
sudo sysctl fs.inotify.max_user_watches=524288
# Permanent fix
echo "fs.inotify.max_user_watches=524288" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
Process Issues¶
Application Doesn't Start¶
Symptoms: Pyreload runs but application fails to start
Solutions:
-
Check Python path:
-
Verify script syntax:
-
Check file permissions:
-
Try exec mode:
Application Doesn't Stop Cleanly¶
Symptoms: Process hangs when restarting
Solutions:
-
Check signal handling:
-
Increase shutdown timeout:
-
Use exec mode:
Zombie Processes¶
Symptoms: Old processes remain after restart
Solutions:
-
Find and kill zombies:
-
Check process cleanup:
-
Use proper signal handling in your application
Configuration Issues¶
Config File Not Found¶
Error: Configuration file not found: config.yml
Solutions:
-
Check file location:
-
Use absolute path:
-
Verify file format:
Invalid Config Options¶
Error: Unknown configuration option: 'watches'
Solution: Check spelling in config file:
Platform-Specific Issues¶
macOS¶
Code Signing Issues¶
Error: "pyreload" cannot be opened because the developer cannot be verified
Solution:
FSEvents Latency¶
Symptom: Slow change detection
Solution: Use polling mode:
Linux¶
Inotify Limits¶
See "File System Limit Errors" above.
Permission Errors¶
Error: PermissionError: [Errno 13] Permission denied
Solutions:
# Fix file permissions
chmod 644 config.yml
chmod 755 app.py
# Or run with appropriate permissions
sudo pyreload app.py # Not recommended
Windows¶
Path Separators¶
Issue: Paths with backslashes in config
Solution: Use forward slashes or escape:
Long Paths¶
Error: FileNotFoundError for long paths
Solution: Enable long path support in Windows:
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
Performance Issues¶
High CPU Usage¶
Solutions:
-
Reduce watched files:
-
Increase poll interval:
-
Use native file watching (not polling):
Slow Restarts¶
Solutions:
-
Reduce startup time in your application
-
Use clean mode:
-
Optimize imports:
Memory Leaks¶
Solutions:
-
Check application for leaks:
-
Restart Pyreload periodically in long-running development sessions
-
Use resource limits:
Debugging¶
Enable Verbose Mode¶
Shows:
- Watched files and directories
- Ignore patterns being applied
- File changes detected
- Process lifecycle events
Debug Config Loading¶
Shows:
- Config file location
- Parsed configuration
- Applied settings
Trace File Events¶
Creates detailed log for analysis.
Getting Help¶
If you're still stuck:
-
Check GitHub Issues: github.com/dotbrains/pyreload-cli/issues
-
Create an issue with:
- Pyreload version:
pyreload --version - Operating system
- Python version:
python --version - Full error message
-
Steps to reproduce
-
Include debug output: