Troubleshooting
Common issues and their solutions when using Laravel Shaka Streamer.
Shaka Streamer Issues
Shaka Streamer Not Installed
Error:
Error: shaka-streamer binary not found
Solution:
-
Install via pip:
python3 -m pip install shaka-streamer -
Verify installation:
python3 -m pip show shaka-streamer -
Configure in
.env:STREAMER_BINARY=shaka-streamer
Temporary Directory Issues
Permission Denied
Error:
Permission denied: /var/www/html/storage/app/streamer/temp
Solution:
-
Create directory:
mkdir -p storage/app/streamer/tempchmod 755 storage/app/streamer/temp -
Set proper ownership:
sudo chown -R www-data:www-data storage/app/streamer/temp -
Or configure alternate path in
config/streamer.php:'temporary_files_root' => storage_path('app/streamer/temp'),
No Space Left on Device
Error:
No space left on device
Solution:
-
Check disk space:
df -h storage/app/streamer/temp -
Clean up old temporary files:
find storage/app/streamer/temp -mtime +7 -delete -
Configure to use alternative disk:
STREAMER_TEMPORARY_FILES_ROOT=/mnt/alternate-disk/streamer-temp
Insufficient Storage Space (pre-flight check)
Error:
InsufficientStorageException: Insufficient storage space in [/dev/shm]: 31457280 bytes free, 1073741824 bytes required.
Unlike "No Space Left on Device" above, this is thrown before streaming starts by a deliberate pre-flight check (see Storage Space Guards) - nothing ran, so there's nothing to clean up.
Solution:
- If
temporary_files_rootorcache_files_rootis a size-limited mount (e.g. a tmpfs), free up space or increase its size. - If this happens routinely under concurrent load, lower your queue's concurrency rather than raising the floor further - the floor is a safety net, not capacity planning.
- Tune or disable the checks via
STREAMER_TEMPORARY_MIN_FREE/STREAMER_CACHE_MIN_FREE(bytes,0disables).
Timeout Issues
Operation Timed Out
Error:
The process timed out
Solution:
-
Increase timeout in
.env:STREAMER_TIMEOUT=28800 # 8 hours -
Check server PHP configuration:
php -r "echo ini_get('max_execution_time');" -
Adjust if necessary:
set_time_limit(0); // Unlimited for CLI
Logging Issues
Logs Not Being Written
Error:
Log channel not working
Solution:
-
Verify logging is enabled:
STREAMER_LOG_CHANNEL=streamer -
Ensure channel exists in
config/logging.php:'channels' => ['streamer' => ['driver' => 'daily','path' => storage_path('logs/streamer.log'),'level' => 'debug','days' => 14,],], -
Check directory permissions:
chmod 755 storage/logs
General Troubleshooting
Configuration Check
Verify configuration is correct:
php artisan streamer:info
Enable Debug Logging
For more detailed information:
STREAMER_LOG_CHANNEL=streamer
APP_DEBUG=true
Clear Cache
Reset configuration cache:
php artisan config:clear
php artisan cache:clear
Test Command Execution
Test if streamer can execute:
use Foxws\Streamer\Support\ShakaStreamer;
$driver = ShakaStreamer::create();
$version = $driver->getVersion();
echo "Streamer Version: {$version}";
Getting Help
If issues persist:
- Check application logs:
storage/logs/streamer.log - Review debug output:
php artisan tinker - File an issue on GitHub with:
- Complete error message
- Configuration (without sensitive data)
- PHP and OS versions
- Steps to reproduce