frankenphp icon indicating copy to clipboard operation
frankenphp copied to clipboard

Kubernetes containers exited with error code 139

Open kwhui-m10c opened this issue 1 year ago • 3 comments

What happened?

We've tried to deploy our APIP application based on the frankenPHP version 1.3.3 (with base image dunglas/frankenphp:1.3.3-builder-php8.2/dunglas/frankenphp:1.3.3-php8.2) in a AWS EKS cluster.

When the site is getting busy, the containers start to exit with code 139 very soon and we don't see any specific logs output.

However we still can't reproduce the same issue by load testing using tools like k6 in our testing environment.

Build Type

Docker (Debian Bookworm)

Worker Mode

Yes

Operating System

GNU/Linux

CPU Architecture

x86_64

PHP configuration

expose_php = 0
apc.enable_cli = 1
session.use_strict_mode = 1
zend.detect_unicode = 0

realpath_cache_size = 4096K
realpath_cache_ttl = 600
opcache.interned_strings_buffer = 16
opcache.max_accelerated_files = 20000
opcache.memory_consumption = 256
opcache.enable_file_override = 1

memory_limit = 1024M
post_max_size = 10M
upload_max_filesize = 10M

opcache.preload_user = root
opcache.preload = /app/config/preload.php

Relevant log output

No response

kwhui-m10c avatar Jan 06 '25 15:01 kwhui-m10c

Are you building with xcaddy? Which PHP extensions are you using? Are you using a PHP framework? Are you also seeing the same error when updating to frankenphp:1.3.6-php8.2 or if you disable opcache?

AlliBalliBaba avatar Jan 07 '25 15:01 AlliBalliBaba

Are you building with xcaddy?

Yes, we need to include additional modules, basically we followed the description in https://frankenphp.dev/docs/docker/#how-to-install-more-caddy-modules

RUN CGO_ENABLED=1 \
    XCADDY_SETCAP=1 \
    XCADDY_GO_BUILD_FLAGS="-ldflags='-w -s'" \
    xcaddy build \
	--output /usr/local/bin/frankenphp \
	--with github.com/dunglas/frankenphp=./ \
	--with github.com/dunglas/frankenphp/caddy=./caddy/ \
	--with github.com/dunglas/caddy-cbrotli \
	--with github.com/dunglas/vulcain/caddy \
	--with github.com/caddyserver/cache-handler

Which PHP extensions are you using?

@composer apcu intl opcache zip redis xsl gd pdo_mysql

Are you using a PHP framework?

We are using API Platform 3.1.5 + Symfony 6.4

Are you also seeing the same error when updating to frankenphp:1.3.6-php8.2 or if you disable opcache?

We didn’t try either

kwhui-m10c avatar Jan 08 '25 16:01 kwhui-m10c

@kwhui-m10c any update on this?

robsontenorio avatar Apr 08 '25 22:04 robsontenorio