Closed martynling closed 2 months ago
Hi @martynling Are you still encountering the same issue?
Also, are you using this buildpack: https://github.com/SpeedCurve-Metrics/heroku-buildpack-php-ddtrace ?
Yes, we still have the same error if we try to deploy to the heroku-24 stack and we are using that buildpack. We have been able to temporarily unblock by reverting to the heroku-22 stack, but on another app (thankfully just on dev) we have also encountered exactly the same error with the heroku-22 stack, so I'm not confident that's going to keep working.
FYI Heroku support doesn't cover 3rd party buildpacks so they were not interested in helping.
Hey @martynling,
thanks for your patience. I am not 100% sure what happens and why the php-fpm -m
process gets killed. But as Heroku only supports PHP >=8, json
comes bundled anyway, so we decided to soften the check and not fail in case the command failed (see #2805).
I just tried with a small instance and it seems to work:
remote:
remote: Installed required source files to '/tmp/build_476efa66/opt/dd-library/1.3.0+9747b3855b2214f785e8a320fb23e68cb0712a7a'
remote: Installing to binary: php (/tmp/build_476efa66/.heroku/php/bin/php)
remote: Installing extension to /app/.heroku/php/lib/php/extensions/no-debug-non-zts-20230831
remote: Copied '/tmp/dd-install/dd-library-php/trace/ext/20230831/ddtrace.so' to '/app/.heroku/php/lib/php/extensions/no-debug-non-zts-20230831/ddtrace.so'
remote: Copied '/tmp/dd-install/dd-library-php/profiling/ext/20230831/datadog-profiling.so' to '/app/.heroku/php/lib/php/extensions/no-debug-non-zts-20230831/datadog-profiling.so'
remote: Copied '/tmp/dd-install/dd-library-php/appsec/ext/20230831/ddappsec.so' to '/app/.heroku/php/lib/php/extensions/no-debug-non-zts-20230831/ddappsec.so'
remote: Created INI file '/app/.heroku/php/etc/php/conf.d/98-ddtrace.ini'
remote: Installation to 'php (/tmp/build_476efa66/.heroku/php/bin/php)' was successful
remote: Installing to binary: php-fpm (/tmp/build_476efa66/.heroku/php/sbin/php-fpm)
remote: Killed
remote: WARNING: The output of '/tmp/build_476efa66/.heroku/php/sbin/php-fpm -m' could not be reliably checked. Please make sure you have the PHP extension 'json' installed.
remote: Installing extension to /app/.heroku/php/lib/php/extensions/no-debug-non-zts-20230831
remote: Copied '/tmp/dd-install/dd-library-php/trace/ext/20230831/ddtrace.so' to '/app/.heroku/php/lib/php/extensions/no-debug-non-zts-20230831/ddtrace.so'
remote: Copied '/tmp/dd-install/dd-library-php/profiling/ext/20230831/datadog-profiling.so' to '/app/.heroku/php/lib/php/extensions/no-debug-non-zts-20230831/datadog-profiling.so'
remote: Copied '/tmp/dd-install/dd-library-php/appsec/ext/20230831/ddappsec.so' to '/app/.heroku/php/lib/php/extensions/no-debug-non-zts-20230831/ddappsec.so'
remote: Updating existing INI file '/app/.heroku/php/etc/php/conf.d/98-ddtrace.ini'
remote: Installation to 'php-fpm (/tmp/build_476efa66/.heroku/php/sbin/php-fpm)' was successful
remote: --------------------------------------------------
remote: SUCCESS
remote:
remote: -----> Validating installation
remote: PHP 8.3.10 (cli) (built: Aug 2 2024 12:21:49) (NTS)
remote: Copyright (c) The PHP Group
remote: Zend Engine v4.3.10, Copyright (c) Zend Technologies
remote: with Zend OPcache v8.3.10, Copyright (c), by Zend Technologies
remote: with ddtrace v1.3.0+9747b3855b2214f785e8a320fb23e68cb0712a7a, Copyright Datadog, by Datadog
remote: with datadog-profiling v1.3.0+9747b3855b2214f785e8a320fb23e68cb0712a7a, Copyright Datadog, by Datadog
remote: with ddappsec v1.3.0+9747b3855b2214f785e8a320fb23e68cb0712a7a, Copyright Datadog, by Datadog
This will make it into the next release, I used the datadog-setup.php
from that PR to try it out.
You could try using that datadog-setup.php
via the DD_INSTALLER_URL
config var from the buildpack and see if this fixes the problem for you too.
Kind regards Florian
@realFlowControl That's great news! Thanks for looking into that and finding a solution. And thanks @iamluc too.
That "next release" has been released now as 1.3.0. So it should work with the proper release too now.
Bug report
We've been running the heroku-24 stack with PHP 8.3 and able to deploy no problem for over a month. Starting around Aug 7th or 8th, deployments stopped working due to dd-trace issue below:
PHP version, profiler version and other outputs are from the latest running production dyno. I haven't yet been able to find a way to get that info from the dyno that is being built and is generating the above output including the error.
From the error message, it would seem that line 1104 below is returning null unexpectedly:
I'm also reporting this to Heroku as I don't see any indication that there has been a code change related to this in the buildpack, but logging it here in case others are also encountering the same issue.
PHP version
8.3.10
Tracer or profiler version
1.2.0
Installed extensions
php -m [PHP Modules] bz2 Core ctype curl datadog-profiling date ddappsec ddtrace dom fileinfo filter hash iconv json libxml mbstring mysqli mysqlnd openssl pcre PDO pdo_mysql pdo_pgsql pgsql Phar posix random readline Reflection session SimpleXML sockets SPL standard tokenizer xml xmlreader xmlwriter Zend OPcache zip zlib
[Zend Modules] Zend OPcache datadog-profiling ddappsec ddtrace
Output of
phpinfo()
No response
Upgrading from
No response