question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FPM worker output not going to logs

See original GitHub issue

With reference to #103, we’ve recently encountered the same issue and are considering using a forked buildpack to accomplish app log capture across our PHP CF deployments, which isn’t ideal from a maintenance point of view.

Given that logging to stdout is fairly idiomatic when dealing with cloud environments (e.g. https://12factor.net/logs), is there any appetite to default the catch_workers_outputphp-fpm.conf setting to yes?

Alternatively, could some configuration be introduced to specifically target this setting which would mitigate the need to fully replace the php-fpm.conf file?

Steps to reproduce are the same as per #103.


What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version?

  • Cloud Foundry version is v241
  • CLI version 6.11.3

What version of the buildpack you are using? 4.3.15

If you were attempting to accomplish a task, what was it you were attempting to do? View application logs as output by the app to stdout

What did you expect to happen? Application logs to appear in aggregated logging

What was the actual behavior? Application logs are not captured

Please confirm where necessary:

  • I have included a log output
  • My log includes an error message
  • I have included steps for reproduction

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:18 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
sclevinecommented, Apr 3, 2017

Hi @beequeue,

We’re going to implement this more generally than the solution on @dmikusa-pivotal’s branch. Follow https://www.pivotaltracker.com/story/show/141979329 for details.

0reactions
beequeuecommented, May 12, 2017

Thank you to all those who worked on this, it’s a great help to us 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

PHP-FPM doesn't write to error log - Stack Overflow
I've made an erroneous php script and run, and see error output on the web browser. Also nginx error log states stderr output...
Read more >
How to get php-fpm to log to stdout / stderr when running in a ...
This works fine - I can get a shell into the container to see the logs. But... it is not best-practice. The problem...
Read more >
HOW TO ENABLE PHP FPM LOG OUTPUT - Gubatron.com
So you will go to your /etc/php/7.0/fpm/php-fpm.conf ... Redirect worker stdout and stderr into main error log. If not set, stdout and ...
Read more >
PHP fpm and cli error log configuration - Yannick Pereira-Reis
First of all we need to enable option catch_workers_output for fpm. Redirect worker stdout and stderr into main error log. If not set,...
Read more >
PHP Logging Basics - The Ultimate Guide To Logging - Loggly
PHP Logging Basics. This guide explores the basics of logging in PHP, including how to configure logging, where logs are located, and how...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found