warehouse
warehouse copied to clipboard
(Likely specific to only my project) Unable to delete project on `test.pypi.org` (503 Service Unavailable)
[!NOTE] This is likely only an issue with this specific project.
Describe the bug
I am unable to delete my project (structlog-sentry-logger) from test.pypi.org with the below 503 error:
Expected behavior
For project deletion to succeed with old releases no longer associated with the project once it is recreated.
To Reproduce
Run through the "delete project" workflow on test.pypi.org for my project.
My Platform
- Browser: Chrome Version 120.0.6099.129 (Official Build) (arm64)
- OS: MacOS Ventura Version 12.7.2 (21G1974)
Additional context
I hit my project size limits in September 2023 and wanted to delete the entire project to clear the 2400+ releases.
- I made an initial attempt in November 2023 which seemed to succeed.
- However, upon uploading a new package to re-establish ownership, the project re-appeared with all previous releases still attached.
- All subsequent attempts over the next few weeks to delete the project have failed with the above-mentioned 503 error
Looks like the number of releases here might be causing the worker to run out of memory and this is https://python-software-foundation.sentry.io/share/issue/af51e229eb114249aec8a61092b13daa/
@di Thanks for the really fast follow-up. That would make sense. Do we have a guess at what the magic number would be to keep the worker from OOMing? If it's not too far off I can manually delete a few releases and try again.
I don't know of the "magic number" per se, but one thing we know if that the production runners have 2GM RAM each, and TestPyPI have 1GB RAM each. This doesn't mean we won't hit the same problem in production, but it's a difference we can look at in reproducing the issue.
I tried to make a "generate me 2500 releases for a project" using the ReleaseFactory.create_batch() in a make shell, but ran into issues. Here's my start of that command if anyone wanted to try and complete it:
from warehouse.accounts.models import User
from warehouse.packaging.models import Project, Description
from tests.common.db.packaging import ReleaseFactory
p = db.query(Project).filter_by(name='example').one()
ReleaseFactory.create_batch(2500, project=p, uploader=p.owners[0])