Closed reubenfirmin closed 4 months ago
reference :
Just wanted to add that if Swoole 6.0.0 has unexpectedly appeared in your Docker image, it might be due to the popular apt package repository (deb.sury.org) updating the php-swoole package to 6.0.0. I've opened an issue there to address this: https://github.com/oerdnj/deb.sury.org/issues/2152.
As recommended by a StackOverflow user (https://stackoverflow.com/a/78675991/2560112), removing or downgrading Swoole when possible might help resolve the issue.
I have the same issues with PHP 8.3.8
, but with Swoole 5.1.3
. The only thing they have in common is that PHP 8.3.8 was also built on July 8 🤔
If I deactivate Swoole, everything works.
PDOException: SQLSTATE[08006] [7] could not send SSL negotiation packet: Resource temporarily unavailable
PHP 8.3.8 (cli) (built: Jun 8 2024 21:34:22) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.8, Copyright (c) Zend Technologies
with Zend OPcache v8.3.8, Copyright (c), by Zend Technologies
We had the same problem. We disabled swoole extension. But we need to downgrade to 5.1.1 for permanent fix.
Perhaps it is related to the SSL changes in PHP versions above 8.2 that I have not synchronized with Swoole. I need to take some time to look into this.
Do you have SSL mode enabled in your PDO constructor?
@NathanFreeman
Running
$pdo = new PDO($dsn, null, null, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
Errors:
With sslmode 'disable'
SQLSTATE[08006] [7] could not send startup packet: Resource temporarily unavailable
With sslmode 'require'
SQLSTATE[08006] [7] could not send SSL negotiation packet: Resource temporarily unavailable
And it works fine with a localhost/127.0.0.1 connection.
@yoyoyeahyoyo @reubenfirmin Does this issue occur when PostgreSQL, PHP, and Swoole are not on the same server?
@yoyoyeahyoyo @reubenfirmin Does this issue occur when PostgreSQL, PHP, and Swoole are not on the same server?
Not sure what you mean. It works fine when trying to connect to a local postgres server, but anything outside of localhost instantly fails. The main servers have php and swoole and postgresql client installed. The php ini configuration for swoole: swoole Author => Swoole Team team@swoole.com swoole.display_errors => On => On swoole.enable_coroutine => On => On swoole.enable_fiber_mock => Off => Off swoole.enable_library => On => On swoole.enable_preemptive_scheduler => Off => Off swoole.unixsock_buffer_size => 8388608 => 8388608 swoole.use_shortname => On => On
I was able to reproduce the error by setting up an ubuntu virtual box instance, installing postgres with pdo, and then installing swoole from ppa:ondrej.
Please answer these questions before submitting your issue.
Please see https://stackoverflow.com/questions/78669556/possible-bug-with-php-pdo-and-with-postgresql - this issue is happening for multiple teams. (We found this thread after this started happening to us yesterday).
What did you expect to see?
What did you see instead?
What version of Swoole are you using (show your
php --ri swoole
)?6.0.0 - we appear to have picked this up along with security patches in PHP 8.2.20 / Ubuntu 20.04.
uname -a
&php -v
&gcc -v
) ?Linux e7843275b2ee78 5.15.98-fly #gac12cf665d SMP Thu Jun 20 16:59:12 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
PHP 8.2.20 (cli) (built: Jun 8 2024 21:37:34) (NTS) Copyright (c) The PHP Group Zend Engine v4.2.20, Copyright (c) Zend Technologies with Zend OPcache v8.2.20, Copyright (c), by Zend Technologies