Laravel-websockets: Cant get statistics work

Created on 1 Dec 2020  路  12Comments  路  Source: beyondcode/laravel-websockets

Hi, this is my config:

"beyondcode/laravel-websockets": 1.9.0

'apps' => [
[
'id' => '12345',
'name' => '123',
'key' => '123',
'secret' => '123',
'enable_client_messages' => true,
'enable_statistics' => true,
],

window.Echo = new Echo({
broadcaster: 'pusher',
key: '123',
wsHost: 'ws.fake.biz',
wsPort: 6001,
wssPort: 6001,
disableStats: false,
encrypted: true
})

APP_URL=https://ws.fake.biz
Events work perfect, but i cant see any statistics. DB have table from migration, but it is empty.
Can anyone help?

Most helpful comment

SOLVED!!! in config -- 'perform_dns_lookup' => true,

All 12 comments

I am having same issue on version 1.2.0. It is not creating record on database :(

Does your APP_URL actually resolve? It uses that to perform a POST request I believe.

Does your APP_URL actually resolve? It uses that to perform a POST request I believe.

yep. my APP_URL resolve.

Can you see it in your access logs then?

Should be like;

123.45.6.78 - - [02/Dec/2020:19:41:31 +0000] "POST /laravel-websockets/statistics HTTP/1.1" 200 12 "-" "ReactPHP/1" "123.45.6.78"

Can you see it in your access logs then?

Should be like;

123.45.6.78 - - [02/Dec/2020:19:41:31 +0000] "POST /laravel-websockets/statistics HTTP/1.1" 200 12 "-" "ReactPHP/1" "123.45.6.78"

log -- clear %:((

Use that to try find out why it's not then. Least you know it's not even trying to do it.

Use that to try find out why it's not then. Least you know it's not even trying to do it.

lol. this is production server and access logs from nginx - disabled. thx for help.

https://yadi.sk/i/TDDyqyAM_4u6Yg
in ws i see all events in dashoard page, but chart in empty

Stats are done via ReactPHP so you wouldn't see it in the dashboard.

Since you gave little information about your setup etc, I can't help.

Stats are done via ReactPHP so you wouldn't see it in the dashboard.

Since you gave little information about your setup etc, I can't help.

my setup. clear laravel 8 and laravel-websockets. i ran migration. DB exist, config at the first post/ PHP 7.4.10
Do u need anything else?

SOLVED!!! in config -- 'perform_dns_lookup' => true,

Good. Was just about to say, need the values on all the config, like 'interval_in_seconds' => 60, etc.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

semsphy picture semsphy  路  3Comments

henzeb picture henzeb  路  4Comments

ElegantSoft picture ElegantSoft  路  4Comments

fridzema picture fridzema  路  4Comments

NIkita-Kim picture NIkita-Kim  路  4Comments