Skip to content

Question: Laravel Feature defer() Which Relies on FastCGI - How Does FrankenPHP Handle This? #1046

Description

@MarkusJLechner

Question:

We do not use worker mode (laravel octane).
Since FrankenPHP does not rely on FastCGI, does Laravel’s defer() function, which depends on FastCGI, still work correctly?
In my local testing, it seems that defer() sends the response to the client as expected, and runs the deferred code afterward. However, subsequent requests to the server are delayed until the deferred functions from the first request are fully processed.
Is there a way to get this or a similar feature working properly in FrankenPHP?

Background Information:

As mentioned in this comment by @dunglas:

FrankenPHP doesn't rely on or use FastCGI.

It's clear that FrankenPHP is independent of FastCGI.

Laravel introduced a new function defer() (see Laravel documentation), which relies on FastCGI (see articles 1 and 2). This function allows the PHP process to stay open after the response has been sent to the user.

I'm aware that Caddyserver has a directive for FastCGI, but this may not be related to FrankenPHP.
I must admit, I don’t have much experience with this topic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions