diff --git a/.env b/.env index b151a9a7d7..f1e13fd3fa 100644 --- a/.env +++ b/.env @@ -13,6 +13,8 @@ RABBITMQ_MANAGEMENT_PORT=10811 MYSQL_ROOT_PASSWORD=root SERVER_NAME=phraseanet-docker +# --------------- GATEWAY TIMEOUT ----------------------- +GATEWAY_SEND_TIMEOUT=120 # --------------- PHP CONFIGURATION -------------------- @@ -21,6 +23,9 @@ MAX_BODY_SIZE=2G # Max input var MAX_INPUT_VARS=12000 +MAX_EXECUTION_TIME=120 +MAX_INPUT_TIME=60 + # Enable opcache ? (0/1) OPCACHE_ENABLED=1 # session cache limiter (off/on) diff --git a/docker-compose.yml b/docker-compose.yml index 1f906e4cb1..6556872889 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,6 +19,7 @@ services: - phraseanet environment: - MAX_BODY_SIZE + - GATEWAY_SEND_TIMEOUT ports: - ${PHRASEANET_APP_PORT}:80 @@ -40,6 +41,8 @@ services: - PHRASEANET_PROJECT_NAME - MAX_BODY_SIZE - MAX_INPUT_VARS + - MAX_EXECUTION_TIME + - MAX_INPUT_TIME - OPCACHE_ENABLED - SESSION_CACHE_LIMITER - PHP_LOG_LEVEL diff --git a/docker/nginx/root/entrypoint.sh b/docker/nginx/root/entrypoint.sh index e46ea44296..4c9bbba5c8 100755 --- a/docker/nginx/root/entrypoint.sh +++ b/docker/nginx/root/entrypoint.sh @@ -2,6 +2,6 @@ set -xe -cat /nginx.conf.sample | sed "s/\$MAX_BODY_SIZE/$MAX_BODY_SIZE/g" > /etc/nginx/conf.d/default.conf +cat /nginx.conf.sample | sed "s/\$MAX_BODY_SIZE/$MAX_BODY_SIZE/g" | sed "s/\$GATEWAY_SEND_TIMEOUT/$GATEWAY_SEND_TIMEOUT/g" > /etc/nginx/conf.d/default.conf exec "$@" diff --git a/docker/nginx/root/nginx.conf.sample b/docker/nginx/root/nginx.conf.sample index ad015e7c5a..f1df63f892 100644 --- a/docker/nginx/root/nginx.conf.sample +++ b/docker/nginx/root/nginx.conf.sample @@ -1,3 +1,4 @@ +send_timeout $GATEWAY_SEND_TIMEOUT; upstream backend { server phraseanet:9000; } diff --git a/docker/phraseanet/entrypoint.sh b/docker/phraseanet/entrypoint.sh index c7db40255f..820023455e 100755 --- a/docker/phraseanet/entrypoint.sh +++ b/docker/phraseanet/entrypoint.sh @@ -58,7 +58,7 @@ chown -R app:app \ www if [ -d "plugins/" ];then -chown -R app:app plugin; +chown -R app:app plugins; fi bash -e docker-php-entrypoint $@ diff --git a/docker/phraseanet/php.ini.sample b/docker/phraseanet/php.ini.sample index 7f5fc97430..86634486a7 100644 --- a/docker/phraseanet/php.ini.sample +++ b/docker/phraseanet/php.ini.sample @@ -380,7 +380,7 @@ expose_php = On ; Maximum execution time of each script, in seconds ; http://php.net/max-execution-time ; Note: This directive is hardcoded to 0 for the CLI SAPI -max_execution_time = 9999 +max_execution_time = $MAX_EXECUTION_TIME ; Maximum amount of time each script may spend parsing request data. It's a good ; idea to limit this time on productions servers in order to eliminate unexpectedly @@ -390,7 +390,7 @@ max_execution_time = 9999 ; Development Value: 60 (60 seconds) ; Production Value: 60 (60 seconds) ; http://php.net/max-input-time -max_input_time = 60 +max_input_time = $MAX_INPUT_TIME ; Maximum input variable nesting level ; http://php.net/max-input-nesting-level diff --git a/lib/Alchemy/Phrasea/Controller/Thesaurus/ThesaurusController.php b/lib/Alchemy/Phrasea/Controller/Thesaurus/ThesaurusController.php index b31ad7e8c2..7b011b9388 100644 --- a/lib/Alchemy/Phrasea/Controller/Thesaurus/ThesaurusController.php +++ b/lib/Alchemy/Phrasea/Controller/Thesaurus/ThesaurusController.php @@ -1242,7 +1242,7 @@ class ThesaurusController extends Controller $this->getDispatcher()->dispatch(WorkerEvents::POPULATE_INDEX, new PopulateIndexEvent($data)); - return $this->app->json($data); + return $this->app->json(["status" => "success"]); } /** diff --git a/package.json b/package.json index b5ea0bc3e0..c51d6fd6f8 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "normalize-css": "^2.1.0", "npm": "^6.0.0", "npm-modernizr": "^2.8.3", - "phraseanet-production-client": "0.34.241-d", + "phraseanet-production-client": "0.34.248-d", "requirejs": "^2.3.5", "tinymce": "^4.0.28", "underscore": "^1.8.3", diff --git a/templates/web/prod/actions/Tools/videoEditor.html.twig b/templates/web/prod/actions/Tools/videoEditor.html.twig index 7e0c3d3109..dc2d1bb0cd 100644 --- a/templates/web/prod/actions/Tools/videoEditor.html.twig +++ b/templates/web/prod/actions/Tools/videoEditor.html.twig @@ -92,7 +92,9 @@ - +
diff --git a/templates/web/prod/actions/publish/publish.html.twig b/templates/web/prod/actions/publish/publish.html.twig index db56c040df..b10cbfad90 100644 --- a/templates/web/prod/actions/publish/publish.html.twig +++ b/templates/web/prod/actions/publish/publish.html.twig @@ -45,7 +45,7 @@ - + diff --git a/templates/web/thesaurus/properties.html.twig b/templates/web/thesaurus/properties.html.twig index 78510851a1..7f8674b6e0 100644 --- a/templates/web/thesaurus/properties.html.twig +++ b/templates/web/thesaurus/properties.html.twig @@ -33,23 +33,17 @@ {{ 'thesaurus:properties:: Mettre dans le stock' | trans }} {{ language }}