Date: December 5, 2025
Issue: SSL Connection Timeout (cURL error 28)
Status: ✅ Resolved
Recently, while working on a Laravel application, I encountered a persistent issue: broadcasting LocationUpdated events through Laravel Reverb kept failing with SSL timeout errors. Here’s a deep dive into the problem and how I solved it.
Date: December 5, 2025
Issue: SSL Connection Timeout (cURL error 28)
Status: ✅ Resolved
Recently, while working on a Laravel application, I encountered a persistent issue: broadcasting LocationUpdated events through Laravel Reverb kept failing with SSL timeout errors. Here’s a deep dive into the problem and how I solved it.
The error in the logs looked like this:
Pusher error: cURL error 28: SSL connection timeout
for https://example-api.com:8080/apps/966067/events
Symptoms:
PusherBroadcaster.php, since Laravel Reverb uses the Pusher SDK internally.The main problem was misconfigured Reverb settings.
.env file pointed REVERB_HOST to an external domain: example-api.com.8080 is typically used for HTTP, not HTTPS.Why it happened: Laravel Reverb uses the Pusher HTTP API internally. When configured to use HTTPS on port 8080 with an external host, it naturally resulted in connection timeouts.
.env ConfigurationChanged the host to local:
# Before
REVERB_HOST="example-api.com"
# After
REVERB_HOST=127.0.0.1
Why 127.0.0.1?
In config/broadcasting.php, add client_options:
'reverb' => [
'driver' => 'reverb',
'key' => env('REVERB_APP_KEY'),
'secret' => env('REVERB_APP_SECRET'),
'app_id' => env('REVERB_APP_ID'),
'options' => [
'host' => env('REVERB_HOST', '127.0.0.1'),
'port' => env('REVERB_PORT', 8080),
'scheme' => env('REVERB_SCHEME', 'http'),
'useTLS' => env('REVERB_SCHEME', 'http') === 'https',
],
'client_options' => [
'verify' => false, // Disable SSL verification locally
'timeout' => 5, // 5-second timeout
'connect_timeout' => 5, // 5-second connection timeout
],
],
php artisan config:clear
php artisan cache:clear
php artisan config:cache
php artisan optimize:clear
Queue workers rely on cached configuration, so clearing cache is essential.
php artisan queue:restart
sudo supervisorctl restart reverb-queue:*
sudo supervisorctl restart reverb:*
# Or
php artisan reverb:restart
php artisan config:show broadcasting.connections.reverb.options
Expected output:
host 127.0.0.1
port 8080
scheme http
useTLS false
curl -s -o /dev/null -w "%{http_code}" --connect-timeout 2 http://127.0.0.1:8080/apps/966067/events
Expected result: 405 (server running).
sudo supervisorctl status reverb:*
sudo supervisorctl status reverb-queue:*
tail -100 storage/logs/laravel.log | grep -E "ERROR.*SSL|ERROR.*timeout"
tail -20 storage/logs/laravel.log | grep "Broadcasting LocationUpdated"
.env.client_options to manage SSL and timeout settings for local development.Your email address will not be published. Required fields are marked *