-
Notifications
You must be signed in to change notification settings - Fork 180
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
Error loading Scheduled actions history after migrating to podman #9279
Comments
postgres logs can be found inside the container (so after running |
@mbussolotto Thank you. Those logs do have some errors - notably
However, these times don't match the issue I have which is when I manually click on any of the Schedules menu items. The Uyuni webui goes unresponsive for many minutes (at least six) until it eventually fails. At this time, the cpu is at 100% for postgres So it looks like postgres is simply taking too long to answer this query. The postgres database directory This works okay pre-migration to podman. Reponses via webui are a few seconds (less than 20), so something seems wrong. I would like to prune that information - how do I do that, please? |
This might be because of |
Thanks. I'm now fully post-migration to container and this is our live system. Here's those contents, and a du of the db files, which are actually 5gb smaller than the old rpm-based system.
|
Thanks, maybe it can explains the issue: we recently find out that
EDIT: IF you have |
Thank you for your time in trying to help me. You were right here in that the conf hadn't transferred - the values were entirely different to the legacy server's. Unfortunately, changing those values to both yours and the legacy ones didn't help. (I did reboot and check they had persisted) The Pending/Failed/Completed schedules still cause things to timeout. Strangely, the Archived table /does/ work, and contains many tens of thousands of entries. I'm currently looping through that in the webui and deleting 10k of these old schedules at a time. They go back several years. Maybe once they're gone, postgres will have more luck displaying the others. |
k, so that's worked for me and I now have access to the scheduled tasks again. I deleted hundreds of thousands of Archived Actions, 10k each. The database was surprisingly quick considering the numbers, and once the first 100k had gone, it got noticably more responsive. These dated back to early 2020 which is when I guess we moved to Uyuni from Spacewalk. Once they were all gone, I could then open Failed Actions. There was another 7810 in there, which I could "Move to archive" and then "delete" Finally, I started with "Completed Actions". Uyuni was now able to show this page without timing out and I've started the long process of Archiving these, and then will delete from from the Archived Actions. I've archived 200k Completeds so far. Once everything is totally done, I'll try a vacuum to recover some db space. So - in short, I have this working again. Thanks for your time. Learning points:
|
@mbussolotto @digdilem-work I'm not aware of any mechanism to archive and delete those actions. But that is a good point and we could consider develop a clean-up procedure for this kind of stuff. We already have one in-place to clean older user sessions from the database |
Thank you. I think it is worth doing. I estimate we had around a million scheduled events accrued over four years, so a scheduled event to truncate from the database feels like a sensible housekeeping feature. If it's useful, our ideal would be to keep events for 30 days, but I imagine others have different needs. A variable for expiry days value would be the best solution. |
Additional: If a developer is poking around in scheduled events anyway, can I raise the question about whether Archived Events are even needed? Having spent several hours tidying up this mess on our system, having to "Archive" each event (in batches on up to 10,000) and then move across to the Archived interface and then select the same events to "Delete" them doubled my work. Each event is sorted into Pending, Completed and Failed for effective archive anyway. I'm not sure what the benefit of them being moved to another database before getting rid. Ideally (from my perspective), the workflow might go:
Then the event is available, both in those lists and the per-machine Event History, for $variable_days, and reduces the chance of them mounting up and affecting performance. |
Problem description
I’ve now test migrated Uyuni 2024-08 from RPM to Podman
One problem I’m seeing on the new vm is that every page of the “Scheduled” menu times out, eventually leading to “The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.”
Whilst doing this, two cpus are at 100% with postgres threads.
These pages still work on the original server but are slow, it’s possible I’ve extended these timeouts somewhere – and the reason seems fairly clear.
In both “Completed Actions” and “Archived Actions”, the ranges go from “1 - 500 of 10,000 (0 selected)” (Web urls /rhn/schedule/CompletedActions.do and ArchivedActions.do)
That’s a suspiciously round figure, so it’s probably more – at least 20,000 logs going back years. I don’t need these logs and would like to remove them – I think that should allow the container version to load those pages without timing out.
The Admin -> scheduled Tasks options are all completing okay; I had expected to see something in there to manage these logs.
How can I remove all but the past week or so of these logs in postgres, please?
Additionally – how do I stop them piling up in future?
(I did send this to the uyuni-users mailing list but got no reply after a couple of days, so retrying here)
Steps to reproduce
As above
Uyuni version
Uyuni proxy version (if used)
No response
Useful logs
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: