Skip to content

heroku-buildpack-php newrelic segfaults? #143

@fruitl00p

Description

@fruitl00p

Using the latest version of the official Heroku buildpack for PHP and setting the correct environment settings for New Relic (and thus loading the New Relic extension) the resulting app fails to boot / run. And simply dies with a segfault... ?

Since i assume Heroku to still work with New Relic enabled, i suspect it must be something and was redirected here by my colleagues. Any tips?

to reproduce:

# get the heroku PHP example app and store it in the /tmp
git clone https://github.com/heroku/php-getting-started.git /tmp/app
# set the buildpack just to be sure
echo "export BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-php.git#v66" > /tmp/app/.env
# clean up git just to be sure
rm -rfR /tmp/app/.git
# re add a single remote Dokku(alt) host
cd /tmp/app
git remote add dokku dokku@dokku-host:php-examle
# remove the .gitconfig to enable the push of .env file
rm .gitconfig 
# add everything + commit 
git add . && git commit -a -m "initial commit"
# push it to the dokku(alt) host
git push --set-upstream app master:master

This will deploy without newrelic as can be tested. This works so far ;)

now set the correct config to enable the loading of the newrelic .so (as described here)

dokku config:set php-examle NEW_RELIC_APP_NAME="test-php-app" NEW_RELIC_LICENSE_KEY="insert your licensekey here"
dokku rebuild php-example

Now hitting the php-example will report something like:

13:56:55 web.1  | started with pid 13
13:56:56 web.1  | DOCUMENT_ROOT changed to 'web/'
13:56:56 web.1  | 4 processes at 128MB memory limit.
13:56:56 web.1  | Starting php-fpm...
13:56:56        | exited with code 1
13:56:56 system | sending SIGTERM to all processes
13:56:58 web.1  | Going down, terminating child processes...
13:56:58 web.1  | exited with code 0

In other words: crash!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions