Randomly happening PDOException: SQLSTATE[HY000]: General error: 7 server closed the connection unexpectedly #1636
Replies: 7 comments 7 replies
-
Configuration used to run the service:
|
Beta Was this translation helpful? Give feedback.
-
Also have tried to use the |
Beta Was this translation helpful? Give feedback.
-
I'm having the same issue using stable tag with MySQL database, and similarly can vouch for the DB stability & overall docker environment stability. I'm going to dump the database and try going back a few version tags. |
Beta Was this translation helpful? Give feedback.
-
@panki can you open a bug report referencing this discussion? This might be an actual bug, but I accidentally overlooked it. If I remember correctly, this same issue happened long ago, when support for swoole was first introduced. The problem back then was that database connections could potentially expire if there's no activity for a couple of hours in one specific worker. The database abstraction layer still assumes the classic PHP approach, in which everything is bootstrapped on every request, so they don't handle expired connections, but that's not the case with swoole, openswoole and roadrunner. The way this was originally approached was by explicitly closing the connection after ever request, and opening it back at the beginning of the next one, if it's not open yet. I'm wondering if there's some situation in which the connection is not being properly closed, and since you have disabled any kind of tracking, there's less interaction with the database in general, increasing the chances for the connection to expire due to inactivity, and causing this errors randomly. I will dig further. |
Beta Was this translation helpful? Give feedback.
-
I went back as far as 3.30 to get the web client to connect (using the free hosted one) but I cannot create a short link nor view domains on it. Visiting the subdomain url I have configured at least now produces a 404 page from shlink and not cloudflare gateway error. I feel like the docker setup is missing something to make it work properly, but I am new to this software entirely. Not having a great introduction lol no longer seeing sql went away errors but constant 'abnormal exit' warnings every page access of the UI. My database also does not have a 'default domain' despite being set in my docker compose environment |
Beta Was this translation helpful? Give feedback.
-
@SenorKarlos please, try not to mix topics. |
Beta Was this translation helpful? Give feedback.
-
I'm having the same issue with the stable version (v4.4.0) right now, anyone has a resolution so far? |
Beta Was this translation helpful? Give feedback.
-
How Shlink is set-up
Summary
Everything works well, but periodically I receive 500 error, the same also happens on production with the same shlink version and PostgreSQL 11.16, compiled by Visual C++ build 1800, 64-bit.
No other services experience any problems with postgres, I'm 100% sure it doesn't drop connections.
Shlink container logs:
Beta Was this translation helpful? Give feedback.
All reactions