swoole.php 846 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. $container->loadFromExtension('swoole', [
  3. 'http_server' => [
  4. 'port' => '8080',
  5. 'host' => '0.0.0.0',
  6. 'running_mode' => 'reactor',
  7. 'hmr' => false,
  8. 'static' => [
  9. 'strategy' => false,
  10. ],
  11. 'api' => false,
  12. 'services' => [
  13. 'cloudfront_proto_header_handler' => false,
  14. 'trust_all_proxies_handler' => false,
  15. 'debug_handler' => false,
  16. 'entity_manager_handler' => false,
  17. ],
  18. 'settings' => [
  19. 'reactor_count' => swoole_cpu_num() * 2,
  20. 'worker_count' => swoole_cpu_num() * 2,
  21. 'task_worker_count' => swoole_cpu_num() * 2,
  22. 'log_file' => '/dev/null',
  23. 'log_level' => 'error',
  24. 'buffer_output_size' => 10 * 1024 * 1024,
  25. ],
  26. ],
  27. ]);