-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
'MySQL client is not connected' error #2780
Comments
I did the rollback to ver 2.1.6 and now it works again. So there must be something still wrong with 2.2.1 |
I found this on web instance
and after restart postal work again. The question is: if I was able to log in, it means that the connection to MySQL was there. Why does it then give me an error? |
This doesn't sound like an issue with Postal itself. Sounds like a connection issue between Postal and your database server. I can't reproduce this unfortunately. |
I agree with you. But ... on two different servers the same problem? And I repeat the question, if the system manages to log in by querying the database, how come it can do it afterwards |
You can repeat the question but doing so without providing any additional information isn't going to help me answer it. |
Sure. I left version 2.2.1 on one server and rolled back to 2.1.6 on the other. Let's see in the next few days what happens. So I can maybe give you more information |
if you are running your MySQL server in docker, make sure you specified it with restart always or unless stopped. If you aren't then it sounds more like you're running out of memory and MySQL is crashing out or something else is causing your MySQL to stop. |
Surely I have not made myself clear. MySQL was always running. The only thing I restarted was postal with the command 90388f044673 mariadb "docker-entrypoint.s..." 7 weeks ago Up 7 weeks I have more of a feeling that postal somehow loses the connection pool and only re-establishes it when you restart it. Lastly, the VM has 8GB of RAM of which there is a good 5GB at the moment |
Hello!
My MySQL server is running an working perfectly fine, also there are no issues when running 2.1.6, this only happened after the 2.2.1 update. |
Thanks for your report. This means to me that the problem is not just on my servers. |
Does it happen fairly soon after starting? Does a restart fix it for a period of time and then it happens again? How is your MySQL server deployed? |
I can tell you that my system February 04, 2024 20:53 Italian time was working (last email sent). This morning not. I run MariaDB like your documentation in this way docker run -d |
For me it seems to run for about 1-2 hours before it stops working. I run a MariaDB server with the same method as @pdifeo but without setting the ip/ports. I connect to it directly by using the same docker network and port 3306. |
I have managed to reproduce this now and will add a fix shortly to have the database connection reestablished automatically. However, this is caused by your MySQL server becoming unavailable for some reason which might also be worth investigating |
Thanks @adamcooke! |
Steps to reproduce
So, it is true that there was a down of MariaDB but on its restart Postal works partially. In a distributed environment, it is normal that some services might restart. @adamcooke thanks for the support |
This is not resolved, I am still seeing this issue on the postal-smtp side. Below are the messages from my docker console: MySQL Container:
Postal SMTP Container
|
That doesn't look related to this issue. This issue is about making connections to database connections that are no longer connected. Your error is 'Lost connection to MySQL server during query' which suggests it was connected and lost the connection during the query. |
Would you like me to create a new ticket? for the record, I rolled back also to see if it would help and it did not. I also reviewed the logs for other postal containers and it appears that the SMTP one is the only one that this happens to |
If you can provide some steps to reproduce the issue which point to a problem with Postal, please submit another issue. |
Describe the bug
Yesterday after doing the update everything worked.
This morning instead I receive
We're sorry, but something went wrong.
postal logs
does not give any kind of error. Happens on two installations on two different servers
Screenshots
The text was updated successfully, but these errors were encountered: