Skip to content
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

Queue details view shows stale Redis statistics #218

Open
Rua-Yuki opened this issue May 8, 2020 · 1 comment · May be fixed by #219
Open

Queue details view shows stale Redis statistics #218

Rua-Yuki opened this issue May 8, 2020 · 1 comment · May be fixed by #219

Comments

@Rua-Yuki
Copy link

Rua-Yuki commented May 8, 2020

Node version: 10.19.0
Arena version: 2.8.1
Bull version: 3.13.0
ioredis version: 4.16.3


The queue details view appears to present stale data within the "Redis Statistics" table.

Metrics shown are consistent throughout the life of a given Arena middleware instance and fail to update as additional clients connect and resources are used: connected_clients, used_memory, and other fields do not reflect the current state of Redis, but rather the state upon first loading.

This issue appears to stem from the reliance on an undocumented behaviour of the queue's Redis client, which is evidently no longer demonstrated given the current ioredis release.

It seems a helper assumes that issuing a Redis INFO query has the client's serverInfo object updated:

await queue.client.info(); // update queue.client.serverInfo
const stats = _.pickBy(queue.client.serverInfo, (value, key) => _.includes(this._usefulMetrics, key));

Unfortunately such is not the case, and ioredis updates the serverInfo object only after initially entering a ready state, and only provided enableReadyCheck is truthy.

Due to the inconsistency regarding this serverInfo field, I suggest the result of the INFO query be parsed directly to extract the necessary information and ensure up-to-date stats are presented.

@Rua-Yuki Rua-Yuki linked a pull request May 8, 2020 that will close this issue
@Rua-Yuki
Copy link
Author

It may be worth noting that this reliance on the queue's client.serverInfo field being updated after an INFO query was broken beginning with Bull 2.0.0, as a result of this version switching to ioredis from node-redis.

The expected behaviour is still demonstrated by node-redis.

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

Successfully merging a pull request may close this issue.

2 participants