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

Statistics not inserted into database table #166

Closed
sanjarani opened this issue May 1, 2019 · 6 comments
Closed

Statistics not inserted into database table #166

sanjarani opened this issue May 1, 2019 · 6 comments

Comments

@sanjarani
Copy link

sanjarani commented May 1, 2019

I did re-install this package several times. when I was trying to learn that. So, I had more of one websockets_statistics_entries migration and I deleted more migrations manually and ran composer dump-autoload ant etc.

Now my realtime statistics works fine, but my statistics do not insert into my table.

Does anyone know why is that?

@francislavoie
Copy link
Contributor

The stats get inserted by doing an HTTP request to your main app at 127.0.0.1 (localhost) by default. If your websocket server can't reach that, the stats don't get recorded.

See this config option https://github.com/beyondcode/laravel-websockets/blob/master/config/websockets.php#L87 which will use your APP_URL config to connect to your app over HTTP. If your app needs a different URL than your .env APP_URL, then you'll need to wait until #115 is merged to add support for that.

@sanjarani
Copy link
Author

Thanks for your respone.

        'perform_dns_lookup' => '127.0.0.1',

did solve my probblem.

@pmochine
Copy link

@francislavoie So I have the problem that my statistic is not recorded as well when I use the subdomain nginx method.

For example:

staging.mydomain.com communications with socket.mydomain.com

Even though I fire messages etc all the time and two users are connected, I don't see it reflected in the database websockets_statistics_entries.

Is base_url_override going to help me?

@francislavoie
Copy link
Contributor

I'm not certain but it should be easy for you to try - either make the change in-place in your vendor to test it, or make a fork and add the change to that, and target that dependency in composer instead. Hope you figure it out!

@pmochine
Copy link

pmochine commented Oct 17, 2019

@francislavoie Oh you were fast responding. Thanks! I'm going to try it out. Currently, I changed my server to "Same location for websockets and web contents", but still no luck. (Cleared chache and restarted supervision). Trying the fork out.

@rehmatweb
Copy link

Thanks for your respone.

        'perform_dns_lookup' => '127.0.0.1',

did solve my probblem.

where you add this line i am also facing this issue

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

4 participants