Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Peak connection in mysql logs incorrect #428

Closed
lovetoast opened this issue Jul 24, 2020 · 7 comments
Closed

Peak connection in mysql logs incorrect #428

lovetoast opened this issue Jul 24, 2020 · 7 comments

Comments

@lovetoast
Copy link

Rather strange issue!

I have about 20 connections online according to the API, but according to the mysql logs I have 180 peak connections!

Any ideas?

Thanks in advance and for the great package.

@rennokki
Copy link
Collaborator

The MySQL peak connections have nothing to do with the peak connections that this package store.

@lovetoast
Copy link
Author

Hi Rennokki,

Thanks for your message, sorry for the delay. So I checked the number of open files for the supervisor processor, and that equates to the number of max connections. However, we have some clients which have 54 connections open, when they only have 1 tab open, on one computer and the connection code is only called once?

Not sure if you could shed some light of this?

@rennokki
Copy link
Collaborator

When you're calling new Echo() it counts as a connection. The deal is that you need only one alive connection to the server on which you communicate which channels you want the user to subscribe to & etc.

@lovetoast
Copy link
Author

In our code, we only have one instance of pusher subscribe though?

@rennokki
Copy link
Collaborator

@lovetoast The package version you're using? We have fixed some memory leaks in 2.x (beta for now): #475

@lovetoast
Copy link
Author

Ah right, I'll check this and revert back, it could also be a quick in how window.load works but I'll let you know as it may help others :)

@lovetoast
Copy link
Author

@rennokki
Hi, as promised, I've been monitoring, using version 1.4.1. We use laravel websockets in document.ready, and there does seem to be an issue with multiple connections made from the same client. I don't think this is a memory leak, but I can see one person, with just 1 browser and 1 tab open and they have 54 connections, as mentioned, using pusher.js.

I'm not sure if an upgrade would fix this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants