Skip to content

Commit

Permalink
docs for FrankenPHP (#1803)
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas authored Oct 25, 2023
1 parent 04ec6dd commit e7a5cfb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions distribution/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ This starts the following services:

| Name | Description |
|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| caddy | [Caddy web server](caddy.md) with the [Mercure](../core/mercure.md) (real-time and async) and [Vulcain](https://vulcain.rocks) (relations preloading) modules |
| php | The API with PHP 8, Composer, and sensitive configs |
| php | The API powered by [FrankenPHP](https://frankenphp.dev) (a modern application server for PHP built on top of [Caddy web server](caddy.md) and with native support for [Mercure realtime](../core/mercure.md), [Vulcain relations preloading](https://vulcain.rocks), and [XDebug](debugging.md)), Composer, and sensitive configs |
| pwa | Next.js project compatible with Create Client and having Admin preinstalled |
| database | PostgreSQL database server |

Expand Down
6 changes: 3 additions & 3 deletions extra/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ Some of your API calls fail with a 502 error and the logs for the API container

This can be due to the cache invalidation headers that are too big for NGINX. When you query the API, API Platform adds the IDs of all returned entities and their dependencies in the headers like so : `Cache-Tags: /entity/1,/dependent_entity/1,/entity/2`. This can overflow the default header size (4k) when your API gets larger and more complex.

You can modify the `api/docker/nginx/conf.d/default.conf` file and set values to `fastcgi_buffer_size` and `fastcgi_buffers` that suit your needs, like so:
You can modify the PHP FPM configuration file and set values to `fastcgi_buffer_size` and `fastcgi_buffers` that suit your needs, like so:

```nginx
server {
root /srv/api/public;
root /app/public;
location / {
# try to serve file directly, fallback to index.php
Expand All @@ -67,7 +67,7 @@ server {
#resolver 127.0.0.11;
#set $upstream_host php;
#fastcgi_pass $upstream_host:9000;
# Bigger buffer size to handle cache invalidation headers expansion
fastcgi_buffer_size 32k;
fastcgi_buffers 8 16k;
Expand Down

0 comments on commit e7a5cfb

Please sign in to comment.