Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
How to uniquely identify worker/engine instances?
I’m experimenting with a custom logger for our OI HTTP server and want each engine to append its log entries to its own file.
I’m struggling to find a reliable way to identify the current engine so I can name the log files accordingly.
I initially tried using the engine’s PID, but since engines are despawned and respawned depending on traffic, the PID isn’t stable and ends up referring to different processes over time.
Would it be possible to use the port number of the engine handling a given HTTP request as an identifier? Or is there a better approach for uniquely identifying each engine instance?
I’m struggling to find a reliable way to identify the current engine so I can name the log files accordingly.
I initially tried using the engine’s PID, but since engines are despawned and respawned depending on traffic, the PID isn’t stable and ends up referring to different processes over time.
Would it be possible to use the port number of the engine handling a given HTTP request as an identifier? Or is there a better approach for uniquely identifying each engine instance?

Comments
EngineID = Get_Status("ENGINE_ID")
or
EngineID = Get_Status("ENGINE")