Dashboard Tickets Assigned to me Is Frozen

  • Used Zammad version: 3.2.x
  • Used Zammad installation source: source
  • Operating system: Unbutnu 18 LTS
  • Browser + version: Chrome (79.0.3945.130), IE (11.657.18362.0), Firefox (72.0.1), Edge (build 18362)

Expected behavior:

When I click on the Dashboard the Assigned Tickets Widget will show the current amount of tickets assigned to my user account along with how many tickets are in the system in total.

Actual behavior:

When I click on the Dashboard the Assigned Tickets Widget is frozen (just on my user account). The widget does not update either the assigned tickets or the total tickets in the system.

Steps to reproduce the behavior:

  • Login
  • Click Dashboard
  • View Widgets under My Stats

It may be worth adding that this only happens for one user. From what I can none of the other users have this issue.

So I’ve had a noesy around in the DB. Before I started I assigned all my ticket to a different user to help spot any anomalies within the database. In theory I would see no tickets assigned to me.

When I query the tickets table using owner_id which uses my user id from the users table and state_id 1,2 and 3 pulled from the ticket_states table, New,Open and Pending Reminder* respectively I see no tickets assigned to my user.

When I query the stats_stores table using o_id which uses my user id from the users table and the key queried as dashboard then I see within the data column;

own: 14
total: 75

These figures are identical to that the widget displays within the dash board and they never change. Why?

If I delete this row from the table will Zammad re-populate it? Hopefully with the correct data.

or

Is there another failing component which is struggling to populate the correct data in this table?

Any help would be greatly appreciated…

Does the widget update if you refresh the application or does it not?
Please not that dashboard statistics are generated every 15 to 30 minutes.

If you’re talking about overviews, that’s another topic.

Hey @MrGeneration thank you for helping me look into this issue.

No the widget does not update if I refresh the application. The same statistics have been displayed for around a month now.

No this isn’t the overview, this is related to eh Dashboard;
image

Do you have by any chance Delayed-Jobs in your system?
zammad run rails r "p Delayed::Job.count" if this is above 0 (and sticky) this might be your issue.

Can you please provide the output of the following command:
zammad run rails r "p Scheduler.find_by(name: 'Generate user based stats.')"

If it’s an old date (so older than 1 hour) you may want to manually run
zammad run rails r "p Stats.generate" to cross check if your issue disappears by that.

This would proberbly point us into the right direction.

After running zammad run rails r "p Delayed::Job.count" I had a count of 0

When I run zammad run rails r "p Scheduler.find_by(name: 'Generate user based stats.')" I get the following output;

#<Scheduler id: 17, name: "Generate user based stats.", method: "Stats.generate", period: 660, running: 0, last_run: "2019-10-04 05:56:58", prio: 2, pid: "", note: nil, error_message: "Failed to run Stats.generate after 10 tries #<Acti...", status: "error", active: false, updated_by_id: 1, created_by_id: 1, created_at: "2018-01-18 14:15:42", updated_at: "2019-10-04 05:57:00">

Running this zammad run rails r "p Stats.generate" does improve the situation. The Tickets Assigned to me updates and displays the correct amount, the total ticket count remains the same though. Ticket updates only update after running this command, not on there own.

Okay, right.
I’d love to see the output of zammad run rails r "p Scheduler.find(17).error_message" - this should push us down the right road.

You’re definitely right, this does looks to have revealed where the issue lies;

"Failed to run Stats.generate after 10 tries #<ActiveRecord::StatementInvalid: PG::DiskFull: ERROR: could not extend file \"base/16385/17259\": No space left on device\nHINT: Check free disk space.\n: INSERT INTO \"delayed_jobs\" (\"handler\", \"run_at\", \"queue\", \"created_at\", \"updated_at\") VALUES ($1, $2, $3, $4, $5) RETURNING \"id\">"

Looking at the actual disks on the server I can see that they are not the culprit as they have plenty of free space, the disk with the most data has used space at 42%.

I suppose my next question would be how do we free up space? And what would cause all the space to be consumed?

Do you happen to have more than the / partition? E.g. a /var partition?
Because your database server is complaining about space issues which doesn’t have to affect Zammad directly (or better it’s storage).

This could be a temporary issue “vanishing” because of log rotates or removal.

Ensure you have enough disk space on every partition you got in your system.
Eventually Zammad even logs those kind of issues in it’s production.log (yes this doesn’t make your issue better then :wink: ).

No we have just the one / partition and no /var partition.
image

Also the database is stored on a remote dedicated PostGreSQL DB, this has just 16% of its space used.

I’m not sure why its reporting space issues as there’s quite bit of free space throughout the environment.

That seems to be an issue with your database host.
Might have been a temporary issue that you no longer can see because it already got fixed?

For example table optimizing can fill up your system like that. (At least in my use cases sometimes)

The refreshing of the job is working by now, right?
If not, run the following command 4-5 times:

Then also run a friendly zammad run rails r "p Scheduler.find(17).update(error_message: '', status: 'ok')".
Note that this technically doesn’t solve that error, but might help Zammad to get over it.

A restart of the Zammad service might help as well.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.