I am totally at loss. I am getting weird errors like this:
They are pretty much random but fairly frequent. Apparently it may be caused by different MySQL timeouts, which I cannot control. It seems that in order to combat those you have to call connection.ping() periodically to reconnect. I added them to Django’s MySQL handler and … now I am getting these errors during execution of connection.ping()! Bizarre!
I cannot believe that I am the only one with this problem. But googling did find anything useful. Yes, I found a bunch of people complaining about it. No, there are no solutions posted. Am I the only one, who uses MySQLdb (indirectly from Django) from FastCGI process?
On the other hand all symptoms listed in the previous paragraph point to alternative conclusion: this problem is so simple and so stupid that people don’t bother to explain how to fix it. Hmm, is this really a case?
Unbelievable! We are talking about FastCGI, which is widely used, and MySQL, which is widely used. Ruby or not, this problem should be solved by now. Are there FastCGI apps, which use MySQL?
Python and Ruby communities were around for many years but this simple problem is not solved yet.