-
-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when running Laravel Octane #1039
Comments
You're very likely encountering php/php-src#13648.
It's unfortunately not that simple because unlike with musl, it's not really possible to create portable binaries with glibc. We'll have to add package for every distribution. For Debian/Ubuntu, see #1039 |
Thank you @dunglas for your prompt response. I understand your reasons for not making a portable binary with glibc. As I am playing around with your official docker image, it is working. The size of the docker image is over 500MB, is it possible to slim it down? Thanks |
Just a comparison:
#1 based on dunglas/frankenphp, with added php extensions and supervisor, etc. |
Hi @dunglas, I am very flattered by your work. Since I am still a newbie here, a simple question: Can I still start https://localhost:8000 with docker under wsl (windows)? I am using laravel octane (from fresh install eg. composer create project, bla, bla--), and want to use frankenphp on my local machine Trying image dunglas/frankenphp:latest-php8.3.7-bookworm, but no luck 😔 Anyway, great thanks! |
@dunglas : I am happy to share that by doing multi-stage build, docker image size came down by almost an half!
Dockerfile
|
@jduan00, most likely those 'lost megabytes' are libraries used by extensions, like libmysql, libzip, libexif, etc, and your application will crash when trying to use some of those extensions. As mentioned, the glibc build isn't "portable" and you can't just copy it over to another system. @sukrokucing, your message is a bit off-topic and probably belongs in the discussion section instead. There isn't enough information to help with your specific problem, but |
@withinboredom : Actually we are on the same page, in the Dockerfile I am installing all required libraries. The docker image is still 378MB. We are doing a lot of QA Testing for a length of time before deciding to switch this to Production.
|
If you don't mind, I'd be very interested and grateful to see a gist of the additional files in the frankenphp image. I wonder if it is stuff that got left behind from a build process (maybe even the base php image) or whatever. https://github.com/GoogleContainerTools/container-diff isn't maintained anymore, but still works last I tried it. |
@withinboredom : be happy to in a day. Just to confirm: container-diff on: dunglas/frankenphp vs eaglwine/debian-frankenphp83? |
@jduan00 no rush, but that sounds right assuming eaglwine/debian-frankenphp83 is the image you are copying everything to manually. |
@withinboredom like this? #1041
|
@withinboredom : can you please let me know the exact container-diff command options you like to see? Here is what I have
|
@withinboredom FYI, here is the most important part of my Dockerfile. So far our Lavavel Octane app is passing QA test. More work to be done.
|
I suspect it is the |
@withinboredom : the resulting docker image is minimized for deploying production apps, so no need to install or compile any additional PHP extensions. Thanks for looking into it! |
It also contains stuff like the gcc compiler, which should not be needed to deploy to prod? What I do is build a static binary in docker with Multistage builds and then copy it to a slim base Image (could probably even use from scratch, but need to create a couple directories and users) That way, it's like 24MB... |
What happened?
Description:
We are experiencing crashes when running our Laravel application using the binary release of FrankenPHP (musl). However, when using the official FrankenPHP Docker image with the same Laravel application, everything works as expected.
Environment:
• FrankenPHP Version: v1.2.5
• PHP Version: 8.3.11
• Caddy Version: v2.8.4 (h1:q3pe0wpBj1OcHFZ3n/1nl4V4bxBrYoSoab7rL9BMYNk=)
• OS: Linux x64 (Ubuntu 24.x)
Issue Details:
• Working scenario: Running the Laravel application inside the official FrankenPHP Docker image works without any issues.
• Problematic scenario: When running the same Laravel application using the standalone binary release (musl), the application crashes frequently.
Request:
We use a Docker deployment process based on Ubuntu 24.x, and while we are capable of recompiling FrankenPHP per the documentation, it would be highly beneficial to have an official binary distribution for glibc-based systems. This would simplify our deployment process and likely resolve the crashes related to musl incompatibility.
Thank you for your consideration!
Build Type
Official static build
Worker Mode
Yes
Operating System
GNU/Linux
CPU Architecture
x86_64
PHP configuration
Relevant log output
No response
The text was updated successfully, but these errors were encountered: