bluppfisk
bluppfisk

Reputation: 2652

symfony built-in server high cpu usage

I'm running Symfony's built-in server during development and noticed that CPU usage of CLI.exe (PHP's command-line interface that's called through php bin/console server:run) is always around 30%, even when idle.

I launch it from a Windows Powershell. Any idea why this happens during idle time?

Upvotes: 1

Views: 1214

Answers (1)

Chris
Chris

Reputation: 137075

PHP's built-in web server is only meant to be used during development:

Warning This web server was designed to aid application development. It may also be useful for testing purposes or for application demonstrations that are run in controlled environments. It is not intended to be a full-featured web server. It should not be used on a public network.

It makes no performance guarantees, and I'm not surprised that it has high CPU utilization.

The Symfony documentation suggests that it is only meant as a convenience:

This way, you don't have to bother configuring a full-featured web server such as Apache or Nginx.

Of course, you are free to run a full-featured web server in development if you want something more tuned to real world use.

Upvotes: 5

Related Questions