Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maximum execution time #265

Open
abdulbasit-dev opened this issue Oct 27, 2024 · 3 comments
Open

Maximum execution time #265

abdulbasit-dev opened this issue Oct 27, 2024 · 3 comments

Comments

@abdulbasit-dev
Copy link

Reverb Version

1.0

Laravel Version

11.9

PHP Version

8.2

Description

While running the reverb in localhost
after same minitus i get this error and the reverb connection will be closed.
i also increased the execution time in AppServiceProvider

    // max execution time
    ini_set('max_execution_time', 300);
Maximum execution time of 300 seconds exceeded

 at vendor/react/event-loop/src/StreamSelectLoop.php:291
   287▕                 }
   288▕             }
   289▕ 
   290▕             /** @var ?callable $previous */
 ➜ 291▕             $previous = \set_error_handler(function ($errno, $errstr) use (&$previous) {
   292▕                 // suppress warnings that occur when `stream_select()` is interrupted by a signal
   293▕                 // PHP defines `EINTR` through `ext-sockets` or `ext-pcntl`, otherwise use common default (Linux & Mac)
   294▕                 $eintr = \defined('SOCKET_EINTR') ? \SOCKET_EINTR : (\defined('PCNTL_EINTR') ? \PCNTL_EINTR : 4);
   295▕                 if ($errno === \E_WARNING && \strpos($errstr, '[' . $eintr .']: ') !== false) {


image

Steps To Reproduce

while running this in the localhost

php artisan reverb:start

@crynobone
Copy link
Member

Can you try the following configuration for reverb.php:

    'servers' => [

        'reverb' => [
            'host' => env('REVERB_SERVER_HOST', '0.0.0.0'),
            'port' => env('REVERB_SERVER_PORT', 8080),
            'hostname' => env('REVERB_HOST'),
            'options' => [
                'tls' => [],
+.             'timeout' => false,
            ],

@abdulbasit-dev
Copy link
Author

@crynobone
still same issue
image

@RobertBoes
Copy link

Using ini_set('max_execution_time', 300); in your AppServiceProvider would set the max execution time to 300 seconds, so yes, the Reverb server will be stopped after 300 seconds.

Reverb is a long-running process, since it's ran through the CLI it would have a timeout of -1 by default, which allows it to run until stopped. Your PHP ini config probably has a max timeout set, so the script will stop after that time. In order for it to work properly you'd need to set the timeout to -1, ideally with different config files, one for the web server and one for the CLI scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants