Open christofer198 opened 4 years ago
@christofer198 taking a quick glance at the code you provided and I see you are calling the function getEnv('DB_PASSWORD')
. That should be getenv('DB_PASSWORD')
instead (note the casing on the e).
Can you change the code to use getenv
and see if the error persists?
@jasonmccallister Thanks for the reply. I've ahead and updated all of my getEnv
to getenv
in my app.php file and tested but the server still hits a segfault, unfortunately.
I should mention that even when using either syntax but with the slave dsn declarations commented out, the server executes requests just perfectly fine. So definitely seems like something is up with the slave dsn declarations.
Can you share the stack/details from the segfault? If you take it out of Kubernetes and just run it in Docker, does it work?
@christofer198 can you also verify that all of the environment variables are defined and not empty?
Description
When trying to implement read/write query splitting using a custom database component like the one detailed in the docs (https://docs.craftcms.com/v3/config/app.html#cache-component), I keep hitting a seg fault on my server (Apache).
I'm running craft in a docker container in kubernetes and can provide my docker file if necessary.
Code
After a little debugging it appears that the slave dsn declaration array is what's triggering the error but I'm unclear as to why a simple array declaration would be triggering the error. Any help would be appreciated, thanks!
Additional info