After Watcher disabled no Content is found - Pagespeed and Collections slow with watcher #11134
Replies: 9 comments
-
While Statamic does work with Vapor - it can be funny with it unless you have everything setup correctly. If I was to guess, this is likely setup related. Can you provide the full stack trace of the error? Your screenshots don't provide much context for us to go on. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Looks like it's an error from Laravel's DynamoDb cache store. Can you try using a different cache driver, like Redis? |
Beta Was this translation helpful? Give feedback.
-
Unfortunately not at the moment, on local everything works like a charm. Is there a way to handle it with DynamoDb? Or without any Cache Store? |
Beta Was this translation helpful? Give feedback.
-
You'll need a cache store. The reason I suggested DynamoDb was to rule it out being an issue (I've also never used it myself). In one of the screenshots you provided, DynamoDb was returning a 400 Bad Request status code. Is there anywhere that'll provide you with some more context about what in the request was "bad"?
The reason the watcher will cause things to be slow is because it's reading all of your files on each request to catch any manual updates you've made to files. It's recommended to have the watcher disabled on production. Although, it looks like you're using the Eloquent Driver for most content things (which you should be for Vapor), so it shouldn't have to read as many files as if you're using flat files. |
Beta Was this translation helpful? Give feedback.
-
Maybe this? This is the full Request Error executing "PutItem" on "https://dynamodb.eu-central-1.amazonaws.com"; AWS HTTP error: Client error: |
Beta Was this translation helpful? Give feedback.
-
Thanks! Is there any way to know which cache key it's trying to read/write? |
Beta Was this translation helpful? Give feedback.
-
Where can I look after it or find it ? |
Beta Was this translation helpful? Give feedback.
-
Just looking at this issue again... Do all of the stack traces for the DynamoDb error come from the updater classes?
If I was to guess, Statamic is trying to store more than DynamoDb allows for in a single row. The easiest way to fix that would be to switch to different cache driver, like Redis. Since this isn't really a bug in Statamic, but rather a setup thing, I'm going to convert this into a discussion. |
Beta Was this translation helpful? Give feedback.
-
Bug description
The Pagespeed was so slow, that the Loading Time was up to 20s. So I read the thread to disable the Watcher by setting it to false in the stache.php.
But after setting it to false, i get Server Error Notification.
After setting the watcher again to true the site is really slow, but everything works fine.
But if the watcher is enabled, the collections aren´t loading, the loading spinner is rotating but nothing will be shown, but the website is reachable again.
How to reproduce
Setting the watcher to false in the stache.php.
After deploying no files are not found anymore in the cp and the Site gives 500 nothing is found.
Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
The Environment is set up with Vapor and Laravel, if this is something to tell about
Beta Was this translation helpful? Give feedback.
All reactions