Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

iowahansen's avatar

php artisan octane:status is quite slow

Hello,

I'm using

HEALTHCHECK CMD php artisan octane:status --server="roadrunner"

in my Docker image and that adds ~700ms to the cold start time of my container. That seems quite slow for a simple check if the process is up.

Is it possible to speed this up?

Thanks!

0 likes
3 replies
Tray2's avatar

How many times a day do you restart your docker images?

If you do it often enough to be bothered if it takes 700ms extra you are probably doing something wrong.

iowahansen's avatar

Thank you for your reply. This docker image is running in Google's Cloud Run service, so depending on traffic a cold start happens quite regularly. While 700ms is not the end of the world in this context, it is a bit wasteful comparing it with other technologies.

iowahansen's avatar

I've looked into what "octane:status" actually does, and it simply reads the process id from a json file and sends a kill -0 to the process. I've replicated that functionality as a simple shell command

HEALTHCHECK CMD kill -0 `cat /srv/laravel/storage/logs/octane-server-state.json | awk -F"[,:}]" '{for(i=1;i<=NF;i++){if($i~/'masterProcessId'2/){print $(i+1)}}}' | tr -d '"' | sed -n 1p`

This effectively takes 0ms, so my cold start is now 700ms faster.

1 like

Please or to participate in this conversation.