Title: bogus usage jobs may be created when usage is behind in processing · Issue #12424 · apache/cloudstack · GitHub
Open Graph Title: bogus usage jobs may be created when usage is behind in processing · Issue #12424 · apache/cloudstack
X Title: bogus usage jobs may be created when usage is behind in processing · Issue #12424 · apache/cloudstack
Description: problem During trouble shooting missing data, when usage is behind it was found that a lot of usage_jobs are created that won’t have a period to process: 2026-01-13 01:00:38,566 DEBUG [cloud.usage.UsageManagerImpl] (Usage-HB-1:null) (log...
Open Graph Description: problem During trouble shooting missing data, when usage is behind it was found that a lot of usage_jobs are created that won’t have a period to process: 2026-01-13 01:00:38,566 DEBUG [cloud.usage....
X Description: problem During trouble shooting missing data, when usage is behind it was found that a lot of usage_jobs are created that won’t have a period to process: 2026-01-13 01:00:38,566 DEBUG [cloud.usage....
Opengraph URL: https://github.com/apache/cloudstack/issues/12424
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bogus usage jobs may be created when usage is behind in processing","articleBody":"### problem\n\nDuring trouble shooting missing data, when usage is behind it was found that a lot of usage_jobs are created that won’t have a period to process:\n\n```\n2026-01-13 01:00:38,566 DEBUG [cloud.usage.UsageManagerImpl] (Usage-HB-1:null) (logid:) it's been 86438558 ms since last usage job and 66261443 ms until next job, scheduling an immediate job to catch up (aggregation duration is 1440 minutes)\n2026-01-13 01:00:38,568 DEBUG [cloud.usage.UsageManagerImpl] (Usage-HB-1:null) (logid:) Scheduling Usage job...\n2026-01-13 01:00:38,570 INFO [cloud.usage.UsageManagerImpl] (Usage-Job-1:null) (logid:) starting usage job...\n2026-01-13 01:00:38,606 INFO [cloud.usage.UsageManagerImpl] (Usage-Job-1:null) (logid:) Parsing usage records between Mon Jan 12 01:00:00 CET 2026 and Tue Jan 13 00:59:59 CET 2026\n2026-01-13 01:01:38,581 DEBUG [cloud.usage.UsageManagerImpl] (Usage-HB-1:null) (logid:) it's been 86498581 ms since last usage job and 66201420 ms until next job, scheduling an immediate job to catch up (aggregation duration is 1440 minutes)\n2026-01-13 01:01:38,581 DEBUG [cloud.usage.UsageManagerImpl] (Usage-HB-1:null) (logid:) Scheduling Usage job...\n2026-01-13 01:02:38,559 DEBUG [cloud.usage.UsageManagerImpl] (Usage-HB-1:null) (logid:) it's been 86558559 ms since last usage job and 66141442 ms until next job, scheduling an immediate job to catch up (aggregation duration is 1440 minutes)\n2026-01-13 01:02:38,559 DEBUG [cloud.usage.UsageManagerImpl] (Usage-HB-1:null) (logid:) Scheduling Usage job...\n2026-01-13 01:03:38,558 DEBUG [cloud.usage.UsageManagerImpl] (Usage-HB-1:null) (logid:) it's been 86618558 ms since last usage job and 66081443 ms until next job, scheduling an immediate job to catch up (aggregation duration is 1440 minutes)\n2026-01-13 01:03:38,558 DEBUG [cloud.usage.UsageManagerImpl] (Usage-HB-1:null) (logid:) Scheduling Usage job...\n2026-01-13 01:04:38,559 DEBUG [cloud.usage.UsageManagerImpl] (Usage-HB-1:null) (logid:) it's been 86678559 ms since last usage job and 66021442 ms until next job, scheduling an immediate job to catch up (aggregation duration is 1440 minutes)\n2026-01-13 01:04:38,559 DEBUG [cloud.usage.UsageManagerImpl] (Usage-HB-1:null) (logid:) Scheduling Usage job...\n2026-01-13 01:05:38,558 DEBUG [cloud.usage.UsageManagerImpl] (Usage-HB-1:null) (logid:) it's been 86738559 ms since last usage job and 65961442 ms until next job, scheduling an immediate job to catch up (aggregation duration is 1440 minutes)\n2026-01-13 01:05:38,558 DEBUG [cloud.usage.UsageManagerImpl] (Usage-HB-1:null) (logid:) Scheduling Usage job...\n2026-01-13 01:06:02,952 DEBUG [cloud.usage.UsageManagerImpl] (Usage-Job-1:null) (logid:) Creating networking offering: 18 for Vm: 75432 for account: 239496\n2026-01-13 01:06:03,028 DEBUG [cloud.usage.UsageManagerImpl] (Usage-Job-1:null) (logid:) create volume with id : 163459 for account: 239496\n2026-01-13 01:06:03,497 DEBUG [cloud.usage.UsageManagerImpl] (Usage-Job-1:null) (logid:) deleting network offering: 18 from Vm: 96981\n```\nthe HeartBeat thread should be clever about existing jobs and not create the extra jobs.\n\n\n### versions\n\nACS 4.19\n\n### The steps to reproduce the bug\n\n1. have an environment running for a while\n2. prune intermediate and usage tables a couple of months\n3. set the events of those months to unprocessed\n4. start usage\n5. observe the a job starts and multiple other jobs are created.\n6. the extra jobs seem to have an interval of -1 second and fail (of course)\n\n\n### What to do about it?\n\nmake sure the heartbeat job does not create jobs while jobs are being processed/scheduled already.","author":{"url":"https://github.com/DaanHoogland","@type":"Person","name":"DaanHoogland"},"datePublished":"2026-01-14T12:40:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/12424/cloudstack/issues/12424"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0f8cc20e-43b7-9ef0-62a3-c1bcb74134c9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8882:11FDDC:1427528:1D51AA7:6A4E4389 |
| html-safe-nonce | 947914d204663a6b0f0c213a84739ad67708105838b19ea834f849bffd87e06a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODgyOjExRkREQzoxNDI3NTI4OjFENTFBQTc6NkE0RTQzODkiLCJ2aXNpdG9yX2lkIjoiNjAwODkxMzM3NzgwNzQ1MTAxNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1c5d8aff3f6556be357857a9bfb6d05bcce09a3ab1fbe046ad1bc0e9a14cc680 |
| hovercard-subject-tag | issue:3813049040 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/apache/cloudstack/12424/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0ec5df6b1dcd6d08c8c4f41cc783a62efde2277a2103fb02e4f7b72e4d9791e8/apache/cloudstack/issues/12424 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0ec5df6b1dcd6d08c8c4f41cc783a62efde2277a2103fb02e4f7b72e4d9791e8/apache/cloudstack/issues/12424 |
| og:image:alt | problem During trouble shooting missing data, when usage is behind it was found that a lot of usage_jobs are created that won’t have a period to process: 2026-01-13 01:00:38,566 DEBUG [cloud.usage.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DaanHoogland |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/apache/cloudstack git https://github.com/apache/cloudstack.git |
| octolytics-dimension-user_id | 47359 |
| octolytics-dimension-user_login | apache |
| octolytics-dimension-repository_id | 9759448 |
| octolytics-dimension-repository_nwo | apache/cloudstack |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 9759448 |
| octolytics-dimension-repository_network_root_nwo | apache/cloudstack |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9fabff9b8b127e686a3ec86f91422e818056ca2c |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width