Search code examples
phpherokuchrootfpmnextcloud

Heroku Shield: no ps:exec?


I have installed nextcloud successfully on heroku, and then to heroku shield.

I'm having some issues trying to diagnos my app errors?! Mostly becuase I do not have

heroku ps:exec

instead I only have: heroku run bash

I can see they are NOT the same live environement. Everytime I try to execute an occ command I get:

The current PHP memory limit is below the recommended value of 512MB.

I know this is not true because when I spin up the drive I receive:

2019-04-17T21:59:11.405086+00:00 app[web.2]: DOCUMENT_ROOT changed to 'server/'
2019-04-17T21:59:11.405100+00:00 app[web.2]: Using PHP-FPM configuration include 'fpm_custom.conf'
2019-04-17T21:59:11.431612+00:00 app[web.2]: Optimizing defaults for IX dyno....
2019-04-17T21:59:11.446380+00:00 app[web.2]: 1 processes at 2GB memory limit.
2019-04-17T21:59:11.449664+00:00 app[web.2]: Starting php-fpm...
2019-04-17T21:59:13.458996+00:00 app[web.2]: Starting httpd...
2019-04-17T21:59:14.408040+00:00 heroku[web.2]: State changed from starting to up

Also, during the install I tried to monitor files, such as config.php. I knew they were getting changed, yet a cat server/config/config.php showed me nothing was changing.

So, I know this is some different chroot environment.

How can I actually see my live files?

Thanks for the help.

Below is a list of config snippets: * adding to .htaccess:

<IfModule mod_php7.c>
  php_value upload_max_filesize 768M
  php_value post_max_size 768M
  php_value memory_limit 1024M
  php_value mbstring.func_overload 0
  php_value default_charset 'UTF-8'
  php_value output_buffering 0
  <IfModule mod_env.c>
    SetEnv htaccessWorking true
  </IfModule>
</IfModule>
  • adding to .user.ini:
upload_max_filesize=2G
post_max_size=2G
memory_limit=2G
mbstring.func_overload=0
always_populate_raw_post_data=-1
default_charset='UTF-8'
output_buffering=0
  • adding to fpm_custom.conf:
php_value[upload_max_filesize] = 2G
php_value[post_max_size] = 2G
php_value[memory_limit] = 2G
php_value[mbstring.func_overload] = 0
php_value[default_charset] = 'UTF-8'
php_value[output_buffering] = 0

php_value[apc.enable_cli] = 1
  • and of course the Procfile reads
web: vendor/bin/heroku-php-apache2 -F fpm_custom.conf server/

Thanks for any help!

Eric


Solution

  • Not intentionally trying to answer my own question here, but I received a response to my heroku ticket: https://help.heroku.com/706339. Here is heroku's reply:

    You're correct that Shield Spaces do not support ps:exec due to compliance requirements. That means there's no way to traverse a running dyno to see file changes in a Shield Space without manually logging the details to your application logs.

    When you spin up a new dyno with the heroku run bash command it does not start Apache, so the changes in fpm_custom.conf are not going to be initialized. You might try manually running the vendor/bin/heroku-php-apache2 -F fpm_custom.conf server/ from inside that dyno to better understand how those configurations work together.