-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with nchan and Android clients #636
Comments
Any suggestions of ideas to try? |
How much shared memory does Nchan have? What is the message publishing rate and average size? |
nchan has 131072K allocated. When it is running as expected outstanding messages are low total published messages: 323326 Issue comes when an android device or similar is used on the page and the device goes stops processing the page, the messages start to build up to the point it exceeds the available memory. The subscriber is still connected. I have tried add buffer length and timeout to the server but does not seem to make a difference.
Message sizes are smallish around 4k total published messages: 333099 |
What subscriber type do these devices use? |
I guess you mean websocket? var vmdashusage = new NchanSubscriber('/sub/vm_dashusage',{subscriber:'websocket'}); |
Yes, thanks. What about the subscriber location block in your config? |
|
function publish($endpoint, $message, $len=1) { |
That's the publisher location. I'm interested in the subscriber location, the one containing |
|
@slact any suggestions on what to try? |
If your traffic permits it, please run Nchan with 1 worker process and see if that makes a difference. |
grep worker_processes /etc/nginx/nginx.conf |
Currently I have noticed that the number of stored messages increases until memory is exhausted, issue is from Android clients and then selecting another tab in the client browser. Tried to set expiry for messages but then dont seem to get purged.
Every 1.0s: curl --unix-socket /var/run/nginx.socket http://localhost/nchan_stub_status computenode: Sun Mar 20 13:48:47 2022
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 384 100 384 0 0 3289k 0 --:--:-- --:--:-- --:--:-- 375k
total published messages: 42200
stored messages: 1879
shared memory used: 14908K
shared memory limit: 131072K
channels: 27
subscribers: 9
redis pending commands: 0
redis connected servers: 0
total interprocess alerts received: 0
interprocess alerts in transit: 0
interprocess queued alerts: 0
total interprocess send delay: 0
total interprocess receive delay: 0
nchan version: 1.2.15
The text was updated successfully, but these errors were encountered: