maximos's avatar

Pusher error: Payload too large..

Hello everyone! You are my last hope. When I try to call broadcast(new MyEvent($data)) with a data size of 7.6240234375kb (strlen(json_ecode($data))/1024), everything is fine, but if I send 7.8046875kb, I get the error Pusher error: Payload too large.. and 413 Request Entity Too Large response: Payload too large. with guzzle 'http_errors' => true. Even after setting all sorts of limits:

  • REVERB_APP_MAX_MESSAGE_SIZE=1000000 in .env
  • client_max_body_size = 1000000M in nginx
  • post_max_size = 1000000M and upload_max_filesize = 1000000M in php.ini

I am using the latest versions of Laravel (12.15.0) and Reverb (1.5.0), at the time of this post. And I am already desperate and completely burned out, please help me.

I work locally and my nginx config is the simplest:

server {
    listen 85;

    server_name localhost;

    root /var/www/my-site-api/public;

    location / {
        try_files $uri /index.php$is_args$args;
    }

    location ~ \.php$ {
        fastcgi_pass unix:/run/php/php8.4-fpm.sock; 

        include fastcgi_params; 
        include snippets/fastcgi-php.conf; 
    }
}

After each change I do:

composer dump && php artisan optimize:clear && php artisan reverb:restart
1 like
3 replies
JussiMannisto's avatar
Level 50

Raise the Reverb server max_request_size limit via the REVERB_MAX_REQUEST_SIZE variable. That's different from the maximum message size.

1 like

Please or to participate in this conversation.