exaco / laravel-octane-dockerfile

Production-ready Dockerfile for Laravel Octane (FrankenPHP, Swoole, RoadRunner) powered web services and microservices. Done right.
MIT License
575 stars 88 forks source link

question about horizon #85

Closed ha-family closed 1 week ago

ha-family commented 1 month ago

image

I would like to ask about the usage of Horizon. After successfully starting the service, I saw an error message as shown in the image. The CPU usage keeps increasing, and I am not sure how to prevent it from continuously retrying.

And I am not sure why my Docker container STATUS changes to unhealthy after a while.

smortexa commented 1 month ago

Which container mode are you using? Is there any error log?

ha-family commented 1 month ago

I executed the following command: docker run -d -e WITH_SCHEDULER=true -e WITH_HORIZON=true -p 8011:8000 --name laravel_octane_cicd $TAG_LATEST

I need the scheduler functionality and want to test Horizon for handling queues, although I'm not sure if WITH_HORIZON refers to Horizon in Laravel.

smortexa commented 1 month ago

The command is correct. Is there any error log in Laravel log files or the container logs?

ha-family commented 1 month ago

I checked the logs of the Docker container, and the content is the same as shown in the image. I’m not sure if there’s a port conflict, but the octane_00 process is being frequently terminated and restarted.

Then, my CPU usage spiked to 99%, and after that, I was unable to connect via SSH. I had to stop the EC2 instance and restart it.

image

image

image

ha-family commented 1 month ago

/storage/logs/horizon.log

image

/storage/logs/scheduler.log image

/storage/logs/laravel.log image

/storage/logs/swoole_http.log image

smortexa commented 1 month ago

It appears that the horizon package has not been installed and there is a port conflict problem.

ha-family commented 1 month ago

I thought the Dockerfile had already installed Horizon for me. And I'm simply running this Dockerfile, so there are no other services in my container. There shouldn't be a port conflict unless the scheduler is also using port 8000.