7 months ago

Laravel Websockets is not working sometimes

Posted 7 months ago by cuartas15

I'm using the latest version of everything, Laravel Websockets, Laravel, Laravel Echo, Axios and so on and so forth.

I 100% based my Forge configuration on this guide

One of my clients reported thay they weren't getting any updates at some point for changes on an appointments module, he had to refresh the page to get it working again.

The weird part is that he was still receiving messages from a small chat module my app has that is based on the same principle.

This is a little bit of code: My Vue file:

* Starts listening to update appointments events.
updateAppointments() {`update-appointments.${this.office_id}`)
        .listen('', (event) => {
            if (!this.isEditingAppointment) {
            } else {
                this.pendingUpdateFlag = true;
        .listen('.list.updated.dates', (event) => {
        .listen('.list.updated.entities', (event) => {
        .listen('.list.updated.locations', (event) => {


// Appointments events
Broadcast::channel('update-appointments.{officeId}', function ($user, $officeId) {
    return ($user->hasPermission('appointments') && $user->office_id === $officeId);

Then the event files you know that I'm not going to include here to simplify this post.

As a side note, I'm forced to subscribe the users to regular channels since private ones won't work when a parameter is included on the channel's name (like this.office_id) it happens with either Laravel Websockets or an old Echo + + redis method I was using in the past.

SMALL UPDATE: As I was writing this post, the same client reported that he didn't receive some chat messages, I asked him if maybe the sender typed both messages very quickly or something, maybe the fake pusher server is not fast enough to give updates in really short periods of time? but yeah, Websockets is not being reliable right now.

I hope you can give me a solution to this.

Thanks in advance

Please sign in or create an account to participate in this conversation.