Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP-FPM is adding a prefix warning to stderr #432

Closed
tlfbrito opened this issue Aug 26, 2019 · 8 comments · Fixed by #577
Closed

PHP-FPM is adding a prefix warning to stderr #432

tlfbrito opened this issue Aug 26, 2019 · 8 comments · Fixed by #577

Comments

@tlfbrito
Copy link
Contributor

tlfbrito commented Aug 26, 2019

According to docker-library/php#207 this is a known issue, but in PHP 7.3 seems to have a solution according to https://www.php.net/ChangeLog-7.php#7.3.0 using decorate_workers_output.

Motivation:

This prefix will make very difficult to process the log entry and correctly parse the log entry.

Example:

php_1  | [26-Aug-2019 16:26:59] WARNING: [pool default] child 6 said into stderr: "[2019-08-26 16:26:59] app.INFO: Response 200 for "GET /ping" {"method":"GET","path":"","uri":"/ping","content-type":null,"latency":708,"client-ip":"172.22.0.1","status_code":200,"user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36"} []"
@footballencarta
Copy link

Is there a timeline for this? Will the decorate_workers_output option be changed upon release of PHP 7.4?

@mnapoli
Copy link
Member

mnapoli commented Oct 19, 2019

@footballencarta it is possible that the PHP 7.4 build forces us to define separate build processes per version. If we do that, then it's easier to solve this problem. But no timeline or no guarantee that this happens, unfortunately.

@tlfbrito
Copy link
Contributor Author

Is there anything that we can do to avoid this on PHP 7.4? Maybe a extension layer?

@mnapoli
Copy link
Member

mnapoli commented Dec 21, 2019

I think this could be doable to fix that.

Here is where we import the config file:

COPY php-fpm.conf /opt/bref/etc/php-fpm.conf

Here is the line that disables the prefix (currently commented out):

;decorate_workers_output = no

What we could do :

  • uncomment the line
  • COPY the config file in the Dockerfile
  • if PHP = 7.2, remove the line (command in the Dockerfile)

@alepieser
Copy link

Hi everyone,

Any news about this issue ? Is there a timeline to solve it ?

Thanks

@mnapoli mnapoli changed the title PHP-FPM is adds a prefix warning to stderr PHP-FPM is adding a prefix warning to stderr Feb 28, 2020
@mnapoli
Copy link
Member

mnapoli commented Feb 28, 2020

@alepieser nothing new AFAIK. Personally I haven't prioritized this issue over other things. Maybe someone else (or you) could try to implement a feature to solve that? I tried to add some pointers in my previous comment, that may help.

@tlfbrito
Copy link
Contributor Author

tlfbrito commented Mar 1, 2020

I think this could be doable to fix that.

Here is where we import the config file:

COPY php-fpm.conf /opt/bref/etc/php-fpm.conf

Here is the line that disables the prefix (currently commented out):

;decorate_workers_output = no

What we could do :

  • uncomment the line
  • COPY the config file in the Dockerfile
  • if PHP = 7.2, remove the line (command in the Dockerfile)

Let me know that you think @mnapoli : #577

@alepieser
Copy link

@TiagoBrito I thought to propose the same solution. Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants