Skip to content

fix/connect-timeout-v2#4

Open
SeBsZ wants to merge 2 commits into
masterfrom
fix/connect-timeout-v2
Open

fix/connect-timeout-v2#4
SeBsZ wants to merge 2 commits into
masterfrom
fix/connect-timeout-v2

Conversation

@SeBsZ
Copy link
Copy Markdown

@SeBsZ SeBsZ commented May 22, 2026

  • Fixes check_tcp_responsiveness so it doesn't trigger excessive logging in MariaDB 10.4+ by switching from legacy fsockopen to mysqli_real_connect + mysql_close. Backwards compatible.
  • MYSQLI_OPT_CONNECT_TIMEOUT force sets a timeout instead of falling back to the OS level TCP SYN retry - ~60s on linux
  • More info about this: https://github.com/illogical-robot/apkmirror.com/issues/2376

…ing in MariaDB 10.4+ by switching from legacy fsockopen to mysqli_real_connect + mysql_close. Backwards compatible.

- MYSQLI_OPT_CONNECT_TIMEOUT force sets a timeout instead of falling back to the OS level TCP SYN retry - ~60s on linux
@SeBsZ SeBsZ added the enhancement New feature or request label May 22, 2026
@qodo-code-review
Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enhances the database connection process by implementing per-database connection timeouts and improving the TCP responsiveness check. Specifically, it now uses mysqli_real_connect with credentials when available to avoid MariaDB authentication warnings and pre-auth abort errors. The review feedback identifies a compatibility issue where using \Throwable would break support for PHP versions prior to 7.0 and suggests using \Exception instead. Additionally, it was noted that the error suppression operator is used inconsistently across mysqli_options calls and should be removed for clarity.

Comment thread ludicrousdb/includes/class-ludicrousdb.php
Comment thread ludicrousdb/includes/class-ludicrousdb.php
Comment thread ludicrousdb/includes/class-ludicrousdb.php Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants