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
2 answers

PHP/Swoole Http Server - how can I dynamically load ssl?

I need load different ssl certificates on the fly, on process request. I try do it like in code below, but server still loading cert1 certificate on handling request, not cert2 as I trying to do in code. How can I dynamically reload different…
Efim Romanov
  • 21
  • 1
  • 5
1
vote
1 answer

Zend View behaviour in a Swoole http server

we are facing a strange behaviour with a Zend Expressive application using Zend View and running in a swoole http server. This behaviour is related with the Singleton pattern. We have configured Zend Expressive to run in a swoole http server -…
Javier Gálvez
  • 166
  • 1
  • 11
1
vote
1 answer

api-platform + swoole = performance improvement?

Is there a "bridge" that incorporates well the Swoole (https://www.swoole.co.uk/) in Api-platform (https://api-platform.com/)? That main point that to me looks interesting is avoiding the startup of the symfony/api-platform framework on each new…
1
vote
1 answer

What's the config for CORS on a Nginx Swoole proxy?

This has been frustrating me to no end. I've been getting that classic line: No 'Access-Control-Allow-Origin' header is present on the requested resource. I'm running the latest stable Nginx on Ubuntu 16.04, with a Swoole server configured to…
Mugluck
  • 499
  • 1
  • 12
  • 24
1
vote
2 answers

Swoole Install error

I am trying install swoole on my mac I tried this sudo pecl install swoole But am getting an error like this fatal error: 'pcre.h' file not found first. How to solve this? thanks in advance!
Sumithran
  • 6,217
  • 4
  • 40
  • 54
1
vote
1 answer

Keep swoole websocket runing even if terminal is closed

I am trying to create a chat application using Socket and using Swoole as backend. I successfully create a connection to server-client but the issue I am facing now is that whenever I close terminal WebSocket is unable to connect. Server code:-…
Aneh Thakur
  • 59
  • 2
  • 7
0
votes
0 answers

PHP: Laravel Octane with Swoole Log Scraping

I'm currently trying to scrape the logs from my Laravel Octane application in a k8s cluster. The scraper gets the logs from the respective consoles, but due to the swoole (not openswoole) layer in front of the Laravel Octane I can't seem to get the…
Micha
  • 11
  • 3
0
votes
0 answers

Getting SocketException while producing an event to Kafka Topic via Laravel

I'm using Swoole PHP Kafka version 1.1.4 to publish events in a Laravel(v5.8.0) worker. Everything runs smoothly for some time, but after some time I'm getting this exception while publishing events AMQP: Failed to Process data with exception:…
0
votes
0 answers

OpenSwoole communicate with server from outside of the server

I created custom WebSocket with OpenSwoole & Laravel. The problem is I can't send data to the server in a convinient way. I want to send data between two seperate PHP processes. Currently I'm creating a new WebSocket client, connecting to server…
megasteve
  • 22
  • 2
  • 7
0
votes
0 answers

I am using Swoole to start a web service and using Sanctum for authentication in Laravel 7

Sanctum Version 2.15.1 Laravel Version 7 PHP Version 7.4 Description I am using Swoole to start a web service and using Sanctum for authentication in Laravel 7. However, there is an issue: after successfully logging out, the token table in the…
2020s
  • 1
  • 1
0
votes
0 answers

Swoole context empty right after assignment, why?

I'm trying to use Swoole context and finally have simplifyed it down to the following code $server->on("Start", function(Server $server) { echo "OpenSwoole WebSocket Server is started at http://127.0.0.1:".config('chat_port')."\n"; …
zzmaster
  • 318
  • 1
  • 5
  • 16
0
votes
1 answer

Dockerfile for php laravel unable to install pecl install pcov ssh2 swoole

This is my Dockerfile to create a docker image for a laravel 8/9 application. FROM php:8.1.9-fpm-alpine RUN apk --no-cache upgrade && \ apk --no-cache add bash git sudo openssh libxml2-dev oniguruma-dev autoconf gcc g++ make npm freetype-dev…
0
votes
0 answers

how to handle swoole http server memery usage

i have a lumen application with too many requests and i used swoole http my swoole http version is "swooletw/laravel-swoole": "^2.6", and here is is my system service [Unit] Description=Start artisan service for application After =…
matin
  • 53
  • 1
  • 8
0
votes
0 answers

Customize startup message Laravel Octane + Swoole

When Laravel Octane with Swoole is starting, he show the message on console: INFO Server running… Local: http://0.0.0.0:80 Press Ctrl+C to stop the server I want remove this message and customize using one custom message.
0
votes
1 answer

Understanding Swoole Rows, Bytes Limits and Memory Allocation in Laravel Octane

I have a question regarding Laravel Octane's rows, bytes, and tables. 'cache' => [ 'rows' => 1000, 'bytes' => 10000, ], Why do we have to limit the number of rows and bytes in the Laravel Octane config file? Can't they be…
Mwthreex
  • 913
  • 1
  • 11
  • 24