Error Log Settings for message length

A common trick I use to gain insight into what certain arrays/object contain is I use a custom write_log function that essentially just prints out info to the php error log in a very clean way. The code can be found here. Usually on my local env, I can do this and see everything. However, in DevKinsta, the string length of the Error Message seems to be getting limited by something. Setting in php.ini? I’m not sure. It will just randomly terminate the string and end with a line that reads “while reading response header from upstream” and some other info about the server:, request:, client: etc.

How can I adjust the settings to give me the full output?

Also, this is the first time I’ve ever seen errors put in the log that start with: "FastCGI sent in stderr: "PHP message:

What exactly is going on with these error logs?

Thank you in advance for any help.

Welcome to DevKinsta @robruiz !

Indeed you could use php.ini to increase the length of the output of the error with log_errors_max_len though I’m not sure if that’s the exact issue occurring here. There are instructions here on how to edit this. A bit of a tease here but if you’re able to wait just a little bit longer, we’re going to make it much easier to update the php.ini configurations (no exact date, but soon). What’s the error shown in the logs there?

There’s no error shown. The output just abruptly ends.

So, I tried this with non success. No value I entered into sites.ini ended up making a difference. I am still getting the same length regardless of what value I enter. I tried like 4-5 different values. And yes, I did restart docker and DevKinsta after each change to the .ini file.

@robruiz Good news! We just released DevKinsta 2.3.0. Could you try updating and let me know if that helps? Here’s more information on that release: DevKinsta Releases (Minor) - #7 by michael

I updated. I see the new php.ini area. That’s interesting. I might give that a try here soon as I am now not getting error logs at all. Not sure if that is an issue on my end or what.

Since errors logs seem to be lacking on DevKinsta, I am now exploring setting up xdebug, however, it seems that there isn’t much help from Kinsta on that end either.

So far, the developer experience on DevKinsta is not ideal. I might have to switch back to Local here soon because I can’t seem to get any level of deep troubleshooting or debugging done while coding.

So…still no error log stuff.

I tried to create a whole new local env in DevKinsta and am now trying to get stuff to write to the log…nothing.

I’m pretty sure the new version squashed the error log functionality somehow. Do I now need to do something else besides making sure wp_debug is enabled in DevKinsta to get the error log working?

@michael - any help here would be much appreciated.

@robruiz We’ll give this a test further and update you. DevKinsta does support the default debug and it’s a main feature of DevKinsta should there should be no issues at all here with that. I’ll let you know!

You might want to test through the write_log debug experience with that new version on your end and confirm nothing got stepped on.

Hi @robruiz . After enabling the following option on DevKinsta

It inserted the following lines on my wp-config.php:

define( 'WP_DEBUG_LOG', 'true' );
define( 'WP_DEBUG_DISPLAY', 'true' );
define( 'WP_DEBUG', 'true' );

I broke the site on purpose and was able to log error entries inside C:\Users\myuser\OneDrive\Documents\DevKinsta\logs\anotherkinstasite_error.log with various errors.

What OS are you on? I tested on Windows. Do you have anything in wp-config.php or elsewhere that is writing to the logs elsewhere other than the default location?