Answers.Body: <p>I am going to refer to the following topic: <a href="https://craftcms.stackexchange.com/questions/40555/changes-to-twig-template-take-over-20s-to-propagate">Changes to twig template take over 20s to propagate</a></p>
  <p>Since you're saying it's on DDEV, there is a big chance you have mutagen enabled. Which causes lagging.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-03-20T22:21:02.270Z
Answers.Text: I do have mutagen enabled but I didn't initially. Changes _without errors_ appear super quick! Especially with mutagen enabled. It's just when there are errors, it takes a really long time to show the error screen.
Answers.UserDisplayName: MikeeBee
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-03-08T13:46:13.240Z
Answers.LastActivityDate: 2023-03-08T13:46:13.240Z
Answers.UserDisplayName: Michael Thomas
Answers.Body: <p>Without feedback from the system I would work from the request to the CMS.
  My thoughts: did you change your .htaccess recently? Does the request get to Craft CMS? Try by adding a dump and die at a high level and see the output. Did you add any template redirects?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-03-06T06:05:04.930Z
Answers.Text: Firstly, apologies for the comical delay in my response. This totally slipped the net. I have updated the issue based on some more findings. Turns out I _am_ getting errors but it's taking a really long time to load them, especially on a secondary multisite site. I think this could be related to the nesting issue I outlined but I really have no idea. If you have any more ideas they would be welcomed, and I promise to respond quicker this time!
Answers.UserDisplayName: MikeeBee
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-03-22T08:43:48.433Z
Answers.Text: @Markus Anton The DDEV setup does not work with `.htaccess` files, especially since it is nginx. As you could read above and in the posted answer, mutagen is most likely the issue. It is fast in certain cases, but it also influences slow response times, since error templates work differently than the front-end ones.
Answers.UserDisplayName: Michael Thomas
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-04T11:26:31.987Z
Answers.LastActivityDate: 2022-09-04T11:26:31.987Z
Answers.UserDisplayName: Markus Anton
Body: <p>I have a strange issue on my local development environment and am unsure how to diagnose it. I have very minimal ability to read logs, but I've had a glance and can't see anything related.</p>
  <p>Essentially, even simple template errors take a really long time to show.</p>
  <p>I am using multi-site and the primary site takes around 10 seconds to show simple template errors but the most troublesome is the secondary site which can take many many minutes to show an error.</p>
  <p>Even if I strip the index template of the secondary site to something like</p>
  <pre><code>{% block content } &lt;-- missing % symbol
  
  {% endblock %}
  </code></pre>
  <p>When I ran the site on MAMP I got this error</p>
  <pre><code>PHP Fatal Error – yii\base\ErrorException
  Uncaught Error: Maximum function nesting level of '256' reached, aborting! in /site-path/vendor/yiisoft/yii2/db/QueryBuilder.php:1571
  </code></pre>
  <p>But since switching to DDEV I <strong>do</strong> get the correct helpful error output stating I have a syntax error but it takes many minutes to display.</p>
  <p>Strangely, errors on the primary site display much quicker when stripped back in a similar fashion.</p>
  <p>I'm unsure where to start to diagnose, given I've stripped the template back so drastically.</p>
  <p>The Colima server has plenty of resources and I have a powerful macOS machine so I'd be surprised if that was a factor. I have also tested this on a friend's machine and he sees the same issue.</p>
  <p>Please let me know what additional information I can provide.</p>
  <p>Many thanks</p>
  <hr />
  <p>Craft <code>v3.7.67</code></p>
  <p>Docker <code>v23.0.1</code></p>
  <p>DDEV <code>v1.21.4</code></p>
  
Tags: <server><error-handling>
Title: Simple template errors take many minutes to display
ThreadText: # Simple template errors take many minutes to display
  
  (Asked by: username_0 on 2022-09-03)
  
  I have a strange issue on my local development environment and am unsure how to diagnose it. I have very minimal ability to read logs, but I've had a glance and can't see anything related.
  
  Essentially, even simple template errors take a really long time to show.
  
  I am using multi-site and the primary site takes around 10 seconds to show simple template errors but the most troublesome is the secondary site which can take many many minutes to show an error.
  
  Even if I strip the index template of the secondary site to something like
  
  ```
  {% block content } <-- missing % symbol
  
  {% endblock %}
  
  ```
  
  When I ran the site on MAMP I got this error
  
  ```
  PHP Fatal Error – yii\base\ErrorException
  Uncaught Error: Maximum function nesting level of '256' reached, aborting! in /site-path/vendor/yiisoft/yii2/db/QueryBuilder.php:1571
  
  ```
  
  But since switching to DDEV I **do** get the correct helpful error output stating I have a syntax error but it takes many minutes to display.
  
  Strangely, errors on the primary site display much quicker when stripped back in a similar fashion.
  
  I'm unsure where to start to diagnose, given I've stripped the template back so drastically.
  
  The Colima server has plenty of resources and I have a powerful macOS machine so I'd be surprised if that was a factor. I have also tested this on a friend's machine and he sees the same issue.
  
  Please let me know what additional information I can provide.
  
  Many thanks
  
  ---
  
  Craft `v3.7.67`
  
  Docker `v23.0.1`
  
  DDEV `v1.21.4`
  
  **Tags:** server, error-handling
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2023-03-08. Score: 1
  
  I am going to refer to the following topic: [Changes to twig template take over 20s to propagate](https://craftcms.stackexchange.com/questions/40555/changes-to-twig-template-take-over-20s-to-propagate)
  
  Since you're saying it's on DDEV, there is a big chance you have mutagen enabled. Which causes lagging.
  
  > **Comments:**
  > **username_0**: I do have mutagen enabled but I didn't initially. Changes _without errors_ appear super quick! Especially with mutagen enabled. It's just when there are errors, it takes a really long time to show the error screen.  
  
  ---
  
  ### Answer by username_2 on 2022-09-04. Score: 0
  
  Without feedback from the system I would work from the request to the CMS.
  My thoughts: did you change your .htaccess recently? Does the request get to Craft CMS? Try by adding a dump and die at a high level and see the output. Did you add any template redirects?
  
  > **Comments:**
  > **username_0**: Firstly, apologies for the comical delay in my response. This totally slipped the net. I have updated the issue based on some more findings. Turns out I _am_ getting errors but it's taking a really long time to load them, especially on a secondary multisite site. I think this could be related to the nesting issue I outlined but I really have no idea. If you have any more ideas they would be welcomed, and I promise to respond quicker this time!  
  > **username_1**: @username_2 The DDEV setup does not work with `.htaccess` files, especially since it is nginx. As you could read above and in the posted answer, mutagen is most likely the issue. It is fast in certain cases, but it also influences slow response times, since error templates work differently than the front-end ones.  
  
  ---
  
  