Which php-config-file has to be modified to change max_input_time in a nextcloud-docker container

When i upload large files to my nextcloud-instance, often a 502: Bad Gateway error appears.

I have a nextcloud running from a docker container

which is basically uses the container

I start the nextcloud with docker-compose

This exposes nextcloud at localhost:8887. I expose it to the web with an apache2-proxy.

I found in the Documentation
and in several posts like This that the max_input_time and the max_execution_time might be too low and have to be increased.

But i have no idea of php and don’t know where and how to modify these values (in the container or on my host?) Where inside the container? I cannot find a php.ini.
What i found is the config.php in the config-volume mapped between the host and the docker container.

When i inspect the container i find:

which has the following lines

php_admin_value[always_populate_raw_post_data] = -1
php_admin_value[post_max_size] = 10G
php_admin_value[upload_max_filesize] = 10G
php_admin_value[error_log] = /dev/stderr
php_admin_flag[log_errors] = on

several .ini-files within

and within
the following files




the www.conf ends with the lines
;php_admin_flag[log_errors] = on
;php_admin_value[memory_limit] = 32M

In no file i found configuration entries for the max_input_time or max_execution_time .

Does anybody has an idea how to find out, what max_input_time i have currently and which config file to change in order to increase this value?

Any help is appreaciated,


on a real debian, usually it is the fpm ini witch might be set. ( /etc/php/7.0/fpm )
Also, can be set in the .htaccess file

finally i added a debug.php-file with

<?php phpinfo(); ?>

in the container next to the index.php to find out the location of the php.ini file(s).
the config was then shown at cloud.myserver.com/debug.php
In my case it was /usr/local/etc/php
Then i mounted an extra config-file in my docker-compose.yml file

  • /data/nextcloud/max-execution-time.ini:/usr/local/etc/php/conf.d/max-execution-time.ini

into the container and wrote the
max_execution_time = 600
into max-execution-time.ini

Finally i had to stop and restart the container with
docker-compose down
docker-compose up -d

Now the max_execution_time is changed.