Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Dynamic Servers Laravel Package

spatie/laravel-dynamic-servers

Dynamically spin up and destroy servers from Laravel to handle variable queue workloads. Uses provider snapshots as templates and lets you determine server count (e.g., based on Horizon wait times) so extra workers are created automatically and removed when no longer needed.

View on GitHub
Deep Wiki
Context7

title: Dealing with hanging servers weight: 4

Starting, stopping, and rebooting server is an asynchronous process. The package uses the self-releasing jobs VerifyServerStarted, VerifyServerStopped, VerifyServerDeleted and VerifyServerReboot to determine if such an asynchronous process completes correctly (see "How servers are managed under the hood").

In the config file you can use the mark_server_as_hanging_after_minutes key to specify how long we should wait for such processes to complete. By default, we wait for 10 minutes.

When it takes longer than 10 minutes, we'll consider the server as hanging. In the dynamic_servers table we'll update the status of the server to hanging. We'll consider that this server is not operational, and we'll not count it when determine how many servers we should start, stop or reboot when calling DynamicServers::ensure($number).

We will also fire an event ServerHangingEvent so you can take an appropriate action (sending a notification, manually deleting the server, ...). This event has two properties:

  • $server: the server that is hanging
  • $previousStatus: this can be starting, stopping or rebooting.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport