TimWolla / docker-adminer

Database management in a single PHP file
https://hub.docker.com/_/adminer/
157 stars 69 forks source link

Enable PHP_CLI_SERVER_WORKERS=4 for "standalone" image #119

Open havran opened 2 years ago

havran commented 2 years ago

I understand "standalone" docker is not mentioned for production, but our SRE team use this docker image, (for internal use), on our Kubernetes cluster and there was problem with imports.

Seems like readiness/liveness probe restart pod, in middle of import.

Simple solution is enable multithread PHP web server:

PHP_CLI_SERVER_WORKERS=4

Now imports works, without interuption.

Also is good idea to have set same timeout, (600 seconds), for NGINX ingress, because default value (60 seconds), stop waiting to end of import and user must reload adminer manually.

TimWolla commented 2 years ago

Simple solution is enable multithread PHP web server:

PHP_CLI_SERVER_WORKERS=4

Now imports works, without interuption.

This looks like a useful addition to me. Can you create a PR with this change? You're in the best position to test that it actually works.

havran commented 2 years ago

Simple solution is enable multithread PHP web server:

PHP_CLI_SERVER_WORKERS=4

Now imports works, without interuption.

This looks like a useful addition to me. Can you create a PR with this change? You're in the best position to test that it actually works.

Probably is enough add this to documentation, because add environment variable for image is very easy in docker-compose or k8s config-map.