RedpointArchive / phabricator

A Docker image that runs Phabricator, an open source software engineering tool
https://hub.docker.com/r/redpointgames/phabricator/
307 stars 98 forks source link

Enhancement: php.ini for less file storage chunking #58

Closed cguentherTUChemnitz closed 7 years ago

cguentherTUChemnitz commented 7 years ago

Some some configuration parts need to set values in the php.ini. But this container does not expose such a file for configuration. A search for php.ini in the container presents two results: /etc/php5/cli/php.ini /etc/php5/fpm/php.ini

Which php.ini should be exposed, e.g. with a volume mount? What i want to achieve, is to configure the upload limit of the file storage backend, as described here: https://secure.phabricator.com/book/phabricator/article/configuring_file_storage/

best, Christian

hach-que commented 7 years ago

The maximum file upload size is currently 200M, as dictated by the nginx.conf file. On the PHP side of things it's already well in excess at 4G.

If the file upload size isn't big enough, we should just increase it for everyone rather than making it a configuration option.

cguentherTUChemnitz commented 7 years ago

Nice to hear that the 200M is the desired behavior. Nevertheless, i am not able to reproduce this large uploading as one chunk. When i upload an 25MB file, it is chunked into 6 parts. Nevertheless if i am using arc upload of the upload dialog in the pharbicator file module.

Test environment:

server {
  listen 443 ssl;
  listen [::]:443 ssl;

  server_name phabricator.$NGINX_HOSTNAME;

  ssl_certificate /etc/letsencrypt/live/phabricator.$NGINX_HOSTNAME/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/phabricator.$NGINX_HOSTNAME/privkey.pem;

  add_header Strict-Transport-Security "max-age=31536000; includeSubdomains" always;

  location / {
    proxy_set_header Host phabricator.$NGINX_HOSTNAME;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header Front-End-Https on;
    proxy_pass http://phabricator:80;
    client_max_body_size 200M;
  }

  location = /ws/ {
    proxy_pass http://websocket_pool;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Front-End-Https on;
    proxy_read_timeout 9999999999;
  }
}

It seems for me that the pending part is to configure the php.ini, as discussed in the config manual: https://secure.phabricator.com/book/phabricator/article/configuring_file_storage/, but i am not able to validate the correctness of the php.ini.

Are you able to reproduce the heavy chunking of the local file storage backend?

hach-que commented 7 years ago

Just letting you know it's unlikely I'm going to get time to reproduce this issue.

According to the Phabricator file storage documentation, we meet all the requirements in our php.ini file. In addition, if these settings were too low, Phabricator would show a setup warning issue, which it does not.

Phabricator's behaviour of chunking files is fixed - an increase in the size of php.ini won't cause Phabricator to store larger chunks. If you want to store larger chunks, you'll need to file a feature request upstream, as that's not something I can control in the Docker image.

hach-que commented 7 years ago

Closing this as there's nothing for us to do here. Chunking behaviour (and the size of chunks) is driven by upstream.