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

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

Open
jasimaz opened this issue Nov 10, 2021 · 2 comments
Open

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

jasimaz opened this issue Nov 10, 2021 · 2 comments

Comments

@jasimaz
Copy link

jasimaz commented Nov 10, 2021

Please provide the following details.

  • Operating System: Linux Ubuntu 18.4
  • PHP Version: 7.2
  • php-mysql-replication Version: 7.0
  • *mysql version (SELECT VERSION();): MySQL 8.0

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
Copy link
Author

jasimaz commented Nov 15, 2022

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

@Moln
Copy link

Moln commented Jan 10, 2023

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

Resolve these issues:

  • Add regular expression matching support for DatabasesOnly or TablesOnly of Config.
  • Resolve Let's Config static properties to non-static. #94, change static config properties to non-static.
  • Add retry feature.
    (new ConfigBuilder())
      ->withRetry(-1) // Retry always.
      ->withRetry(0)  // Disable retry feature. (Default)
      ->withRetry(2)  // Retry twice.
  • PHP 8.1,8.2 supports.

Retry feature, maybe this is what you want.

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

No branches or pull requests

2 participants