Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] [PHP-FTM] Peformance #1445

Open
yahorsi opened this issue Dec 3, 2024 · 1 comment
Open

[Question] [PHP-FTM] Peformance #1445

yahorsi opened this issue Dec 3, 2024 · 1 comment

Comments

@yahorsi
Copy link

yahorsi commented Dec 3, 2024

Hi guys, Im new to the PHP, sorry if question is dumb :)

As far as I understand PHP-FTM model, every request gets executed in the process of the PHP workers, also, every request gets "fresh" state of the process, in this case:

  1. Am I right PHP will have to open new HTTP connection to the OTEL Collector?
  2. Am I right there is no caching of the traces/metrics/logs possible on the PHP side?
  3. What happens if pushing metrics/traces/logs takes long for some reason, could it cause perf issues because worker process won't return to the pool fast?

Thanks, regards!

@brettmc
Copy link
Collaborator

brettmc commented Dec 4, 2024

Hi @yahorsi

  1. yes
  2. yes
  3. yes it can cause perf issues. we recommend having an opentelemetry collector located near to your application, per https://opentelemetry.io/docs/languages/php/exporters/#minimizing-export-delays

You could also look at https://www.php.net/manual/en/function.fastcgi-finish-request.php however that doesn't return workers to the pool faster, it just returns user responses faster.

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

No branches or pull requests

2 participants