Skip to content

GitHub warns about new cache size limit #301

Description

@hmeine

I received an e-mail that looked too much like phishing at first, but turned out to be a legitimate warning from GitHub that some unnamed repo has exceeded the newly introduced cache size limit of 10G.

Some more research showed that the only repo I have access to that makes significant use of the cache is this one, and without adding up all the numbers it does look plausible that it exceeds 10 GiB (not by much, I guess):

Showing 26 of 26 caches in MeVisLab/pythonqt

ID          KEY                                                 SIZE        CREATED           ACCESSED
1119617807  ccache-Linux-5.15.*-2025-09-12T14:50:11.400Z        339.15 MiB  about 5 days ago  about 5 days ago
1119619185  ccache-Linux-5.12.*-2025-09-12T14:50:18.172Z        329.42 MiB  about 5 days ago  about 5 days ago
1119605239  ccache-Linux-ubuntu-24.04-2025-09-12T14:48:49.583Z  337.38 MiB  about 5 days ago  about 5 days ago
1119601279  ccache-macOS-5.9.*-2025-09-12T14:48:32.345Z         246.93 MiB  about 5 days ago  about 5 days ago
1119599277  ccache-Linux-6.9.*-2025-09-12T14:48:19.991Z         473.55 MiB  about 5 days ago  about 5 days ago
1119598884  ccache-Linux-ubuntu-22.04-2025-09-12T14:48:07.786Z  323.26 MiB  about 5 days ago  about 5 days ago
1119598204  ccache-macOS-5.9.*-2025-09-12T14:48:11.283Z         243.80 MiB  about 5 days ago  about 5 days ago
1119594910  ccache-Linux-6.8.*-2025-09-12T14:47:52.420Z         473.58 MiB  about 5 days ago  about 5 days ago
1119590514  ccache-macOS-5.12.*-2025-09-12T14:47:22.877Z        188.19 MiB  about 5 days ago  about 5 days ago
1119489815  ccache-Linux-5.12.*-2025-09-12T14:36:58.195Z        328.48 MiB  about 5 days ago  about 5 days ago
1119492216  ccache-Linux-5.15.*-2025-09-12T14:37:13.677Z        338.21 MiB  about 5 days ago  about 5 days ago
1119495220  ccache-Linux-6.9.*-2025-09-12T14:37:34.001Z         473.79 MiB  about 5 days ago  about 5 days ago
1119492897  ccache-Linux-6.8.*-2025-09-12T14:37:17.993Z         472.35 MiB  about 5 days ago  about 5 days ago
1119473481  ccache-Linux-ubuntu-24.04-2025-09-12T14:35:05.092Z  336.41 MiB  about 5 days ago  about 5 days ago
1119524637  ccache-macOS-5.9.*-2025-09-12T14:40:39.276Z         243.52 MiB  about 5 days ago  about 5 days ago
1119473081  ccache-Linux-ubuntu-22.04-2025-09-12T14:35:04.792Z  322.33 MiB  about 5 days ago  about 5 days ago
1119519534  ccache-macOS-5.12.*-2025-09-12T14:40:11.859Z        187.57 MiB  about 5 days ago  about 5 days ago
1119523871  ccache-macOS-5.9.*-2025-09-12T14:40:31.381Z         243.56 MiB  about 5 days ago  about 5 days ago
1105357676  ccache-Linux-6.9.*-2025-09-11T05:02:50.443Z         473.52 MiB  about 7 days ago  about 5 days ago
1105354673  ccache-Linux-6.8.*-2025-09-11T05:02:05.472Z         472.30 MiB  about 7 days ago  about 5 days ago
1105361422  ccache-Linux-5.15.*-2025-09-11T05:03:42.186Z        338.16 MiB  about 7 days ago  about 5 days ago
1105367168  ccache-Linux-5.12.*-2025-09-11T05:04:56.324Z        328.43 MiB  about 7 days ago  about 5 days ago
1105359969  ccache-macOS-5.9.*-2025-09-11T05:03:18.738Z         243.41 MiB  about 7 days ago  about 5 days ago
1105359678  ccache-Linux-ubuntu-24.04-2025-09-11T05:03:08.329Z  336.31 MiB  about 7 days ago  about 5 days ago
1105357797  ccache-Linux-ubuntu-22.04-2025-09-11T05:02:42.723Z  322.27 MiB  about 7 days ago  about 5 days ago
1105352969  ccache-macOS-5.12.*-2025-09-11T05:01:35.088Z        187.52 MiB  about 7 days ago  about 5 days ago

Activity

  1. mrbean-bremen commented on Sep 18, 2025

    @mrbean-bremen
    Contributor

    I received the same mail and wondered where it came from - didn't realize that PythonQt uses caching for the ccache.
    We should probably reduce the maximum cache size for hendrikmuhs/ccache-action, which is by default set to 500 MB, maybe something like 200MB. This would of course reduce the effectiveness of the cache, but hopefully not that much.

  2. mrbean-bremen commented on Sep 19, 2025

    @mrbean-bremen
    Contributor

    Hm, that doesn't really help. The builds are slower, and while the caches are smaller, their number increases with the number of branches, so the size limit is reached anyway.
    I will make a few more tests.

  3. mrbean-bremen commented on Sep 25, 2025

    @mrbean-bremen
    Contributor

    I added a workflow that is supposed to delete caches for deleted or merged PRs, but it doesn't work due to permission problems. The workflow is basically taken straight from GH Actions help.
    I also found elsewhere that this doesn't work in forks (I have seen similar behavior in other workflows), so I merged the changes in the hope that it will work after the merge. It didn't. I also added a setting to delete unused references from the caches, so now it takes a little longer until the caches reach the limit, but the problem is still unsolved.

    I wouldn't care much about GH deleting old caches in this repo automatically that exceed the limit (which it does), except that this is done apparently across repos, and I'm using caches in a number of other (Python) repos. I don't know what the algorithm for cache deletion is, but I wouldn't like to randomly lose caches in other repos.

  4. mrbean-bremen commented on Nov 4, 2025

    @mrbean-bremen
    Contributor

    @hmeine - I haven't seen the warnings for a while now. Setting evict-old-files seems to have helped - currently the used cache in PythonQt is about 2.5 GB.
    I couldn't get the workflow to delete caches to work, but old caches are removed anyway after some time, so I'll probably just remove I removed that workflow again. It could still be that the problem reappears with many active PRs, but for now I will ignore this issue (and close it if the problem does not reappear after a couple of months).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions