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

Allow for multiple php-fpm services to be run in downstream containers. #84

Merged
merged 1 commit into from
Nov 24, 2020
Merged

Allow for multiple php-fpm services to be run in downstream containers. #84

merged 1 commit into from
Nov 24, 2020

Conversation

nigelgbanks
Copy link
Contributor

This doesn't really change anything functionally in this container but allows for downstream containers to run multiple php-fpm services if needed.

One may want to run multiple php-fpm services so they can include/exclude php extensions like xdebug dynamically. In this scenario two php-fpm services are running one with xdebug loaded and the other without.

nginx then looks at the cookies of requests, if it finds a XDEBUG_SESSION cookie it forwards the request on the the php-fpm socket/service which has xdebug enabled otherwise it passes the request to the php-fpm socket/service with xdebug disabled.

Why would one do this? xdebug really kills performance and can cause failures due to timeouts even when not running, just by having the module enabled (this includes having profiling disabled, auto debug and remote debugging disabled).

Changes inspired by this article: https://jtreminio.com/blog/developing-at-full-speed-with-xdebug/

N.B. Food for thought, maybe split up php/nginx container into two. Which would allow for running multiple php containers and have them communicate over tcp rather than sockets. Though no small feat lots of changes required but ultimately might be more flexible for developers.

@nigelgbanks nigelgbanks requested a review from dannylamb October 20, 2020 17:17
@dannylamb
Copy link
Member

I see what you're getting at. I can't say I understand 💯 but I can definitely test and merge for you.

@dannylamb
Copy link
Member

No explosions. Let's pull it in.

Copy link
Member

@dannylamb dannylamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@dannylamb dannylamb merged commit a1afabc into Islandora-Devops:main Nov 24, 2020
@nigelgbanks nigelgbanks deleted the php-fpm-prefix-argument-support branch December 8, 2020 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants