brefphp / bref

Serverless PHP on AWS Lambda
https://bref.sh
MIT License
3.12k stars 366 forks source link

php (not fpm) with BREF_LOOP_MAX=1 is 2x slower than php-fpm #1819

Closed allan-simon closed 3 months ago

allan-simon commented 3 months ago

Description:

Due to the issue #1369 , we've switched our "web" lambda (with symfony) from php-fpm layer to php (the same we use for symfony commands / messenger)

We've noticed a significant increase in response time as you can see on our monitoring, (you can see the before/after switching very clearly on the response percentile graph) so it does not seems related to a specific kind of request

image

we're currently using with BREF_LOOP_MAX=1 due to some symfony service being too stateful and not reset-ing correctly between two requests.

However my understanding would be that bref without php-fpm should be at least as fast as with php-fpm (and faster when reusing the same kernel ) so I can't wrap my head on why it's two times slower.

Any idea on where I can dig to find the core issue ?