Timeout error when trying to upload to Snap Store

I’m trying to upload a somewhat large snap (1.9 GB) to the Snap store and am getting an timeout error trying to upload it. I already have the name registered on the Store. When I run snapcraft upload <my_snap_name>.snap --release stable it takes several hours for the upload progress to get to 99% then the upload fails with a timeout error.

$ snapcraft upload <my_snap_name>.snap --release stable
Preparing to upload '<my_snap_name>.snap'.
After uploading, the resulting snap revision will be released to 'stable' when it passes the Snap Store review.
Install the review-tools from the Snap Store for enhanced checks before uploading this snap.
The Snap Store encountered an error while processing your request: gateway timeout (code 504).=================================================================================  ]  99%
The operational status of the Snap Store can be checked at https://status.snapcraft.io/

Link to the code

Thanks for any help!

Sounds like this bug I experienced with flightgear. https://bugs.launchpad.net/snapstore-server/+bug/1859949

1 Like

Thanks, this seems like it’s the same issue. I marked myself as experiencing the same bug on launchpad. Is there any resolution besides waiting for the bug to be fixed? I seem to be able to install flightgear with snap install --edge flightgear.

I worked around the issue with flightgear by making the snap considerably smaller.

I don’t know what to say about the bug. Perhaps @noise can weigh in.

1 Like

We will have to take a look at that bug again, but in the interim have you looked at ways to slim it down? That’s a pretty large snap for users to download as well. If a good chunk of the size is in data files for each language you could consider splitting those off using a content interface:

1 Like

Thanks for the help, I managed to decrease my snap’s size to just under 1GB and I was able to upload it!

My application is for translating text and I wanted to be able to bundle the data files to support a number of languages with the snap which increased the size. For now I deleted all of the pre-bundled translations except Engilish↔French. If I wanted to improve it I may look into using the content interface to install language packages like @noise recommended or distribute them outside of the Snap Store. I also have PyTorch as a dependency which by itself takes up the better part of 1GB but I might be able to reduce that by excluding CUDA support or other features I don’t use.

I also seem to get pretty bad performance in snap versus running natively with Python which I think may be partially due to the large size of the snap.

I’m very curious about this, can you start a new forum topic about this so we can dig into it? Many applications experience a one-time slowdown on the first launch after a reboot, but should be on-par with native app performance after that first start.

@ijohnson I just posted a new topic, the first launch after a reboot is the worst but even after that it seems to have worse performance than native Python.

1 Like

Hi, I’m getting the same error (stops at 99% with 504 error) but my application has only a size of around 80mb. It also seems to pass all review tool tests. https://status.snapcraft.io/ says all services running normally. Any ideas? Thanks!

After a few hours, I just tried to upload it again and now it worked! :smiley:

1 Like