You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@airavata.apache.org by "Marcus Christie (Jira)" <ji...@apache.org> on 2021/02/26 22:17:00 UTC

[jira] [Commented] (AIRAVATA-3251) OperationalError (2003, "Can't connect to MySQL server on '156.56.104.11' (113)")

    [ https://issues.apache.org/jira/browse/AIRAVATA-3251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17291945#comment-17291945 ] 

Marcus Christie commented on AIRAVATA-3251:
-------------------------------------------

So I thought that this issue was related to something I've seen before, where DB connections are kept in a pool and if they are kept for longer than their max lifetime in the server, the server ends up closing them. But that's not what is going on here for a couple reasons:
- when the connection ages out and gets closed by the server, you get error **2006, MySQL server has gone away**. This error is error 2003
- Django doesn't pool connections in it's default configuration. You have to specific CONN_MAX_AGE as some positive number of seconds for it to pool connections. https://docs.djangoproject.com/en/2.2/ref/databases/#persistent-connections

However, in looking at error emails, I noticed something peculiar. We get these errors sporadically, typically a few a week. But on dev, we haven't received one for almost a month (we received 14 in January and none so far this month).  I checked and I did recently upgrade the mysqlclient library on the develop branch (https://github.com/apache/airavata-django-portal/commit/8e4bc9dd458b1363604d971189ee16c5a97d67f6). So possibly that fixed this issue. I hope so, since this error, if taken literally, means our database server is fairly unreliable, but that doesn't seem to actually be the case.

> OperationalError (2003, "Can't connect to MySQL server on '156.56.104.11' (113)")
> ---------------------------------------------------------------------------------
>
>                 Key: AIRAVATA-3251
>                 URL: https://issues.apache.org/jira/browse/AIRAVATA-3251
>             Project: Airavata
>          Issue Type: Bug
>          Components: Django Portal
>            Reporter: Marcus Christie
>            Assignee: Marcus Christie
>            Priority: Major
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)