Skip to content

WIP: fixing slow cgi mode#837

Closed
withinboredom wants to merge 2 commits into
mainfrom
fix/slow-cgi-mode
Closed

WIP: fixing slow cgi mode#837
withinboredom wants to merge 2 commits into
mainfrom
fix/slow-cgi-mode

Conversation

@withinboredom
Copy link
Copy Markdown
Member

This is currently VERY draft-state.

Goals:

  1. Make CGI mode multi-threaded (WIP)
  2. Reuse the PHP context (similar to FPM/worker mode) so it doesn't have to be recreated from scratch each request. (not started)
  3. Allow specifying a maximum number of requests before restarting. (not started)

This PR intends to start a number of threads that handle non-worker requests. Like FPM/worker mode, it reuses the PHP context from the previous request to cut down on latency.

fixes #836

@dunglas
Copy link
Copy Markdown
Member

dunglas commented Jun 1, 2024

Good start! Maybe could we get rid of the thread pooling library and just start a fixed number of threads by ourself (each thread will consume the same channel, as you started to implement).

@withinboredom
Copy link
Copy Markdown
Member Author

FYI: this hasn't been forgotten. My wife has had surgery, and I've been doing daddy + day job. She should be recovered in the next two weeks or so.

@dunglas
Copy link
Copy Markdown
Member

dunglas commented Jun 24, 2024

Good luck to your wife and you! There is no urgency. I can take a look if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Low performance in cgi-mode

2 participants