statamic:static:warm 504s #6243
Replies: 6 comments 7 replies
-
Hey @stephenmeehanuk, Can you provide some more information?
Looks like a resource limit or configuration problem of your server to me. What's the |
Beta Was this translation helpful? Give feedback.
-
More than likely the bottlenecks are from images being generated when the static:warm command visits the pages.
It feels a bit strange that it takes a long time, every time. Can you provide your deploy script? Do you ever clear the glide cache? |
Beta Was this translation helpful? Give feedback.
-
I'm still having issues with this. I don't need the warm command to be fast, I can set a cron job to do it, but running it must not 504 the website. Is there a command to cache certain pages? It'd be helpful to try and cache certain URLs, I'm wondering if the 504s are happening on certain templates. Running a full cache is taking a long time. |
Beta Was this translation helpful? Give feedback.
-
Been looking into this some more... Working and testing locally. I thought if I picked the template apart I might be able to identify the source of the problem. The problem being The end point of removing partial after partial was a blank view template. I went a step further and deleted the contents of Still working locally, I ran Using Google Dev Tools. The first request/response is I thought it perhaps it had something to do with using a collection as a structure? So I tried the same thing on the home page (empty view and layout, then These tests, show my local installation of Statamic is taking just over 2 seconds to load a blank view and layout? A fresh local installation of Statamic. Same test, blank view and layout, clear app cache, first request/response time StagingIt's worth mentioning, when I visit a page marked as But the first visit is how the warm script sees the site, and this is causing problems. If my installation of Statamic is taking just over 2 seconds to load a blank view and layout locally, perhaps this is being replicated on the staging server? Is there anything else I can try? I'm kinda running out of ideas, I'd really appreciate some suggestions.
|
Beta Was this translation helpful? Give feedback.
-
Ok, think I've got to the bottom of this! My site is on a staging server, it's not gone live yet. The client is making regular content updates, while I work on the templates. It's a really good process. My deploy script includes a
... but not a During development, I'd occasionally
Followed by
I was missing the To cache the staging website via
This significantly reduces the number of pages 504ing, from many to only a handful. Running the |
Beta Was this translation helpful? Give feedback.
-
I also once had a similar problem, which was caused by cache not being connected on the intermediate site. I often forgot about it and for a long time could not understand what the problem was. Therefore, I recommend using suitable site monitoring: this is relevant for the intermediate stage and for the final version of the website. |
Beta Was this translation helpful? Give feedback.
-
Hi
Anyone got any tips for static caching?
On my staging website, I'm experiencing 504 errors when trying to run
php artisan statamic:static:warm
. It only stops 504ing when I run - and allow to finish -php please assets:generate-presets --queue
Weird thing is though, all the image transformations have already been done before running statamic:static:warm
The problem is this 'solution' takes nearly two hours to run.
Is this normal?
Image transformations are located in
/public/img/containers/assets
. The assets directory is 2.75GB.How come running
assets:generate-presets
improves the speed ofstatamic:static:warm
, it doesn't 504 and it's super fast.statamic:static:warm
also runs faster when doing the same locally.I'm just concerned this might be an issue when the website finally goes live. If it takes so long to rebuild the cache, with the possibility of 504ing the website in the process.
Beta Was this translation helpful? Give feedback.
All reactions