Questions tagged [swoole]

Swoole is an open source async framework for PHP.

Swoole is an event-driven asynchronous and concurrent networking communication framework with high performance written only in C for PHP.

The network layer in Swoole is event-based and takes full advantage of the underlying epoll/kqueue implementation, making it really easy to serve thousands of connections.

More information can be found on GitHub and the Swool website.

92 questions
1
vote
0 answers

laravel queue use connection object provided

I need to dispatch a job from a swoole coroutine environment. if I directly use the default redis connection. an error will be thrown Uncaught Swoole\Error: Socket#17 has already been bound to another coroutine#81, reading of the same socket in…
rain hon
  • 11
  • 2
1
vote
1 answer

Laravel Swoole Docker "There are no commands defined in the "swoole" namespace"

So, I want to configure the swoole laravel project. I run a Dockerfile and it successfully run. Then I want to run compose file this give me error There are no commands defined in the "swoole" namespace. This is my first experience with swoole.…
1
vote
0 answers

Laravel Octane concurrently very slow to resource model

I'm trying to improve the performance of my model resources. This is a simple test that without Octane corrotine takes 2 seconds. I tried to divide them and play inside a coroutine but the time that used to be 2 seconds, became 24 seconds, when in…
1
vote
0 answers

Is it possible to run php-fpm with swoole?

Online search is saying php-fpm vs swoole, that swoole replaces the need for it. But I use php-fpm so that I can control which php version each directory uses via a handler. One of the php versions I'm running uses php 5.4, so if swoole has some way…
Thrash Tech
  • 21
  • 1
  • 4
1
vote
1 answer

Laravel Octane Event Listener not firing

I'm using laravel sail to run laravel octane on swoole. I made a change to my EventServiceProvider:
1
vote
0 answers

How to change database connection dynamically in laravel-octane?

I need to change database dynamically on the fly in laravel-octane or laravel-swoole package. I am working on a custom multi tenant system. Application is working fine without swoole/octane.
Al Emran
  • 46
  • 1
  • 6
1
vote
0 answers

Laravel octane - Infinite loading on server error

When I get a server error or it encounters a dd method, the request hangs forever and no response comes. PHP: 8.0.3 Laravel: v8.62 Octane + Swoole Running in wsl2
Parsa_Gholipour
  • 794
  • 5
  • 16
1
vote
1 answer

Laravel Octane Nginx Supervisor Configuration

I've been investigating Laravel Octane as a possibility for performance improvements in an existing Laravel application and have found every 4000-5000 requests up to 15 requests are returning as failed. I currently have the laravel application…
Aaron
  • 13
  • 6
1
vote
0 answers

How to can i create socket io server with php?

I want create a socket io server with php in lumen (I don't want use nodejs, I must create with php). I very searched in google and test very php libraries, But i could not found a good way for create socket io server with php/lumen. I Tried These…
Mohammad Ilbeygi
  • 191
  • 3
  • 11
1
vote
1 answer

Handle process signals in Swoole script without pcntl_signal() function

I'm implementing a php parallel tasks script based on Swoole module which works as daemon. Is it possible to use Swoole functions to handle process signals instead of pcntl_signal()?
Andrey Lebedev
  • 141
  • 1
  • 9
1
vote
1 answer

enable https on swoole with laravel api

hi i have problem enabling https on swoole with laravel api when i'm tryping to sending api request through http it works well but i can't through https : curl http://127.0.0.1:8008/api/v1/search?include=searchplace it works curl…
angtesters
  • 13
  • 1
  • 5
1
vote
0 answers

How to use RedisPool to manage several Redis connections with Swoole websocket

I have a Swoole websocket server and I would like to use a RedisPool to manage several Redis connections to pick one for each query when I get a message. When I try to get a connection from my RedisPool, Swoole outputs an error "Error: Uncaught…
jeff
  • 35
  • 6
1
vote
2 answers

How send message on swoole (websocket extension for php) from php to browser?

This file run my server ws = new swoole_websocket_server('127.0.0.1', 9502); $this->ws->on('open', function ($ws, $request) { echo…
Ganbatte
  • 11
  • 2
1
vote
1 answer

Doctrine EntityManager is Closed using Swoole

I have a Laravel application which is running 'swooletw/laravel-swoole' to handle requests. Doctrine is being used as ORM using laravel-doctrine/orm. Normally if some ORMException is thrown by doctrine it closes the EntityManager which is supposed…
Irfan Amir
  • 11
  • 2
1
vote
1 answer

Do you need Composer for async PHP and a HTTP server like ReactPHP or Swoole?

From my understand Composer is used to autoload classes via the SPL function provided by PHP, or at least register the method to call when the class does not exist. This then has to happen upon every request for a traditional setup with Laravel or…
tty2018
  • 45
  • 1
  • 6