Random Error 500 without log

A staging website is having a random error 500 on its search page.
It is happening randomly. There are no event logs.
And I can’t reproduce the issue on my local dev environment.

Any idea how to debug this, anyone?

Hey @chris,

Error 500 is always logged somewhere. Here is the log stack in order of likelihood:

  1. Application (October event log / browser JS)
  2. Framework (Laravel storage/logs)
  3. Compiler (PHP error log)
  4. Web server (Apache logs)
  5. Kernel (OS event log)
  6. Infrastructure (Load balancer, ISP, etc.)

Work your way down the stack, and you should find the reason behind the error 500.

1 Like

thanks @daft

I found something in the PHP error log that does not bubble up to the OC event log.

PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 90112 bytes) in /var/www/accm.staging-voilaah.com/public_html/vendor/composer/ClassLoader.php on line 571, referer: http://accm.staging-voilaah.com/search/partner
PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 294912 bytes) in /var/www/accm.staging-voilaah.com/public_html/storage/cms/twig/2f/2f1da163e8220262488ae0751550849bb31ce05c07e0e0c85878b8421cb39308.php on line 62, referer: http://accm.staging-voilaah.com/search/partner
PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 294912 bytes) in /var/www/accm.staging-voilaah.com/public_html/vendor/symfony/http-foundation/Response.php on line 368, referer: http://accm.staging-voilaah.com/search/partner
PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 278528 bytes) in Unknown on line 0, referer: http://accm.staging-voilaah.com/search/partner

and the line 62 for this twig partial is:

 echo $this->env->getExtension(\Cms\Twig\Extension::class)->partialFunction((                // line 8
($context["__SELF__"] ?? null) . "::searchresult.htm")                , $context['__cms_partial_params']                , true                );

Increasing, memory_limit in the php.ini seems to fix the issue so far.