XF 2.2 Dockerized XF successfully run for hours then, errors occurs (not able to login, etc.)


New member
Hello everyone,

I'm running xenforo in a docker environment launched via docker-compose, I also use S3 to store the files (internal_data and data) and Cloudfront as reverse proxy for S3 and also to a simple VPS :

My dockerized env is very basic : Nginx + PHP + MySQL + Redis

Everything works fine but after a few hours errors start appearing : I can no longer connect to ACP or my XF forum (I have to try again several times).

Here is the stack trace :
An exception occurred: [ErrorException] [E_WARNING] Cannot modify header information - headers already sent by (output started at php://input:1) in src/XF/Http/Response.php on line 388

    header() in src/XF/Http/Response.php at line 388
    XF\Http\Response->sendHeaders() in src/XF/Http/Response.php at line 280
    XF\Http\Response->send() in src/XF.php at line 574
    XF::runApp() in index.php at line 20


If I restart my docker container (PHP image), the bug disappears

I wonder what could be the cause of this error, any idea ?

Theme (premium) :
- DohTheme Flow (compatible with XF 2.2)

Server config :
  • PHP 8.0
  • MySQL 8.0
  • Redis 7

XF version : 2.2.12
Addons :

  • [DohTheme] RE-MI 1.2.0
  • Amazon S3 for XenForo 2.3.0
  • Math 3.1.0
Many thanks


Update (solved) :

I ended up by using the php-fpm from host (I installed it) instead of Docker image and I no longer have the issue.

I will try to understand why there was this bug later (maybe a missing package in my Dockerfile ? or bad files permissions... idk)
Random question, do you run NGINX, PHP-FPM and MySQL in 1 container or spread across multiple containers?
Hi, it was spread across multiple containers (y)

I just realized that my diagram can be a bit confusing ^^

4 services (now 2 because I just use dockerized MySQL + Redis) launched via docker compose
Top Bottom