swoole.php 809 B

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