Production Images Break #5715
-
Stock install, start production and images start breaking in about 5 min. Verified across 3 systems, 2 Mac's and one Centos 9 and with both ruby 3.0.4 and 3.3.0. Clearing cache with the Rails.cache.clear rails console command fixes them for 5 min. A change to an image through the admin interface fixes them for about 5 min. Disabling caching fixes the issue. Adding url expire changes when the images break. Removing all products through the admin console and adding 1 still experiences the issue. IDK if it's a bug but it seems like it. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
What are you using for image hosting? Many of the backends (like S3) will generate expiring URLs if the objects are stored privately. You need to configure ActiveStorage (if that's what you're using) to make the files public. |
Beta Was this translation helpful? Give feedback.
-
Is stock solidus (unaltered, freshly installed) suitable for production out of the box? It’s just a stock install, so to answer ur question. Whatever and however it’s setup and used upon installation. A 100% stock install with SQLite running in prod will break the sample product images in 5 min. |
Beta Was this translation helpful? Give feedback.
-
Some context. I’m not a developer, I doubt that comes as a surprise. I just don’t have that kungfoo, I wish I did but I don’t. I can build enterprise caliber datacenters, that’s my stuff. I’m trying to setup a store to sell my bass fishing accessories. And I want to host everything, or as much as I can. I print my accessories on Bambu 3d printers, I have a print farm that runs 24/7. I notice that some Bambu (bambulabs.com) store links from about a year ago still work. So I guess the question is why and when url expire? A store can benefit from self promotion (shared url links). And I also guess the problem could be if someone shares a sensitive link from their account allowing another to checkout. My brother is much better at this stuff than I, and he seems a bit perplexed by this as well. But he hasn’t worked with Ruby/rails in a long time. I’m just trying to get this store up to sell my little widgets. |
Beta Was this translation helpful? Give feedback.
It is production-ready, but that doesn't necessarily mean every possible Rails configuration and deployment setup is. For example, while there has been some development to make it more viable, SQLite is typically only used in development. You may run into issues with using it in production.
The images issue is one that I think we should maybe discuss (within @solidusio/core-team). The image caching continues to cause issues for many new users, depending on how ActiveStorage is configured.
Regardless, there are various solutions: