Welcome Guest, Not a member yet? Register   Sign In
Config caching
#1

Hi,
I am in process of trying to optimise performance of a CI4 project.
I have been watching a few PRs on Github over the last few months and followed the Config Caching with interest.
(https://github.com/codeigniter4/CodeIgniter4/pull/7696)
I have tried uncommenting the lines currently in the index.php file. However, when I uncomment these I get an error 500 message with no error reporting and nothing in the logs.
Is there anything extra I need to do to trial the config caching?
Luke
Reply
#2

(12-18-2023, 08:58 AM)ltarrant Wrote: Hi,
I am in process of trying to optimise performance of a CI4 project.
I have been watching a few PRs on Github over the last few months and followed the Config Caching with interest.
(https://github.com/codeigniter4/CodeIgniter4/pull/7696)
I have tried uncommenting the lines currently in the index.php file. However, when I uncomment these I get an error 500 message with no error reporting and nothing in the logs.
Is there anything extra I need to do to trial the config caching?
Luke
You need to delete the Config Cache:
https://codeigniter.com/user_guide/conce...fig-values

Regards, Frederik
Reply
#3

You can also use the php.ini opcache.
Edit your php.ini file opcache is towards the end of it.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#4

(12-18-2023, 09:59 AM)Frederik Wrote:
(12-18-2023, 08:58 AM)ltarrant Wrote: Hi,
I am in process of trying to optimise performance of a CI4 project.
I have been watching a few PRs on Github over the last few months and followed the Config Caching with interest.
(https://github.com/codeigniter4/CodeIgniter4/pull/7696)
I have tried uncommenting the lines currently in the index.php file. However, when I uncomment these I get an error 500 message with no error reporting and nothing in the logs.
Is there anything extra I need to do to trial the config caching?
Luke
You need to delete the Config Cache:
https://codeigniter.com/user_guide/conce...fig-values

Regards, Frederik

Thanks for reply. I deleted the Config Cache file. The page then loads OK on the first request but subsequent requests still see an error response with no detail or anything in the logs.
Reply
#5

Show error message for debugging.
Put the following code in the top of index.php:

PHP Code:
error_reporting(E_ALL);
ini_set('display_errors''1'); 
Reply
#6

I'm getting the error:

Fatal error: Uncaught Error: Class "Kint\Renderer\AbstractRenderer" not found in /home/***********/vendor/codeigniter4/framework/system/Config/BaseConfig.php on line 64
Error: Class "Kint\Renderer\AbstractRenderer" not found in /home/***********/vendor/codeigniter4/framework/system/Config/BaseConfig.php on line 64
Reply
#7

Why do you use Kint in production?
Or didn't you set to production mode?
Reply
#8

(This post was last modified: 01-08-2024, 03:28 AM by ltarrant.)

We don't but I was just testing this on the development server to see what performance increase it offers and if it worth looking at introducing to the production server.

(12-28-2023, 04:40 AM)kenjis Wrote: Why do you use Kint in production?
Or didn't you set to production mode?
Reply
#9

@ltarrant
Try this PR if you can.
https://github.com/codeigniter4/CodeIgniter4/pull/8558
Reply




Theme © iAndrew 2016 - Forum software by © MyBB