krowinski / php-mysql-replication

Pure PHP Implementation of MySQL replication protocol. This allow you to receive event like insert, update, delete with their data and raw SQL queries.
MIT License
323 stars 97 forks source link

PHP Fatal error: Uncaught MySQLReplication\Socket\SocketException #88

Open jasimaz opened 2 years ago

jasimaz commented 2 years ago

Please provide the following details.

Steps required to reproduce the problem.

  1. Connecting to replica
  2. Start consuming

Expected Result.

The replication application should work continuously, it works for sometimes and throws error.

Actual Result.

After running for few seconds, sometimes minutes it throws the following error;

PHP Fatal error: Uncaught MySQLReplication\Socket\SocketException: Success in /var/apps/nxo-fetcher-new/src/MySQLReplication/Socket/Socket.php:65 Stack trace:

0 /var/apps/nxo-fetcher-new/src/MySQLReplication/BinLog/BinLogSocketConnect.php(63): MySQLReplication\Socket\Socket->readFromSocket(1273)

1 /var/apps/nxo-fetcher-new/src/MySQLReplication/Event/Event.php(57): MySQLReplication\BinLog\BinLogSocketConnect->getResponse()

2 /var/apps/nxo-fetcher-new/src/MySQLReplication/MySQLReplicationFactory.php(130): MySQLReplication\Event\Event->consume()

3 /var/apps/nxo-fetcher-new/src/MySQLReplication/MySQLReplicationFactory.php(116): MySQLReplication\MySQLReplicationFactory->consume()

4 /var/apps/nxo-fetcher-new/app/stream.php(78): MySQLReplication\MySQLReplicationFactory->run()

5 {main}

thrown in /var/apps/nxo-fetcher-new/src/MySQLReplication/Socket/Socket.php on line 65

jasimaz commented 1 year ago

@krowinski, can you please provide me any update on this?

Moln commented 1 year ago

You can try this fork https://github.com/Moln/php-mysql-replication .

Resolve these issues:


Retry feature, maybe this is what you want.