walkor / workerman

An asynchronous event driven PHP socket framework. Supports HTTP, Websocket, SSL and other custom protocols.
http://www.workerman.net
MIT License
11.12k stars 2.26k forks source link

Question: docker and debug/daemon mode #992

Closed vanodevium closed 9 months ago

vanodevium commented 9 months ago

The nature of how docker works requires a single long-running process. In fact, I can't run php server.php start -d because container will stop immediately.

Question: does the debug mode affects the performance of the workerman? If it affects, is there any method of starting workerman not in debug mode, but as a long-running process?

Thanx!

joanhey commented 9 months ago

I use it in the techempower bencmark in debug mode https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/frameworks/PHP/workerman/workerman.dockerfile#L25

And it's really fast https://www.techempower.com/benchmarks/#section=test&runid=502e3495-dda5-4232-a89a-7c08755fcf0e&hw=ph&test=fortune

walkor commented 9 months ago

does the debug mode affects the performance of the workerman?

debug mode does not affects the performance of the workerman.