8000 Fix dead connections by abnegate · Pull Request #9190 · appwrite/appwrite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix dead connections #9190

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

Merged
merged 6 commits into from
Jan 8, 2025
Merged

Fix dead connections #9190

merged 6 commits into from
Jan 8, 2025

Conversation

abnegate
Copy link
Member
@abnegate abnegate commented Jan 8, 2025

What does this PR do?

When a PDO or database exception is thrown, and the exception was due to a lost connection, mark a pool connection as unhealthy, so that on next reclaim it will be re-created.

Introduces a connectionForProject resource that intercepts the project DB so that the connection can be used directly when needed for marking as unhealthy.

Test Plan

Manual tests + library tests

Related PRs and Issues

  • (Related PR or issue)

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

@abnegate abnegate requested a review from christyjacob4 January 8, 2025 07:50
Copy link
github-actions bot commented Jan 8, 2025

Security Scan Results for PR

Docker Image Scan Results

Package Version Vulnerability Severity
pyc 3.12.7-r0 CVE-2024-12254 HIGH
python3 3.12.7-r0 CVE-2024-12254 HIGH
python3-pyc 3.12.7-r0 CVE-2024-12254 HIGH
python3-pycache-pyc0 3.12.7-r0 CVE-2024-12254 HIGH
golang.org/x/crypto v0.26.0 CVE-2024-45337 CRITICAL
golang.org/x/net v0.28.0 CVE-2024-45338 HIGH

Source Code Scan Results

🎉 No vulnerabilities found!

Copy link
github-actions bot commented Jan 8, 2025

✨ Benchmark results

  • Requests per second: 1,017
  • Requests with 200 status code: 183,023
  • P99 latency: 0.179595881

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 1,017 1,620
200 183,023 291,571
P99 0.179595881 0.071324842

@christyjacob4 christyjacob4 merged commit 910bd4d into 1.6.x Jan 8, 2025
63 checks passed
@christyjacob4 christyjacob4 deleted the fix-dead-connections branch January 8, 2025 09:30
@abnegate abnegate restored the fix-dead-connections branch January 10, 2025 07:19
@christyjacob4 christyjacob4 deleted the fix-dead-connections branch January 10, 2025 11:39
@abnegate abnegate restored the fix-dead-connections branch January 13, 2025 04:56
abnegate pushed a commit that referenced this pull request Jan 13, 2025
Fix dead connections
# Conflicts:
#	composer.lock
@loks0n loks0n mentioned this pull request Mar 17, 2025
@loks0n loks0n mentioned this pull request Apr 8, 2025
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

Successfully merging this pull request may close these issues.

2 participants
0