"ResourceWarning: unclosed" error using mysql-connector-python

200 views
Skip to first unread message

Zemian Deng

unread,
Jun 10, 2014, 11:26:18 PM6/10/14
to django...@googlegroups.com
Hi there,

I am using mysql-connector-python (1.1.6) with Django (1.6.5) and myapp is working fine. But each SQL call to DB will result the following warning messages:

Exception ignored in: <socket.socket fd=4, family=AddressFamily.AF_INET, type=SocketType.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 62622), raddr=('127.0.0.1', 3306)>

ResourceWarning: unclosed <socket.socket fd=4, family=AddressFamily.AF_INET, type=SocketType.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 62622), raddr=('127.0.0.1', 3306)>


Has anyone seen this and know a way to resolve it?

Also, FYI, I am using the following in my settings file.
DATABASES = {
    'default': {
       'ENGINE': 'mysql.connector.django',
       'NAME': 'mydb',
       'USER': 'test',
       'PASSWORD': 'test',
    },
}

Thanks,
Zemian

Zemian Deng

unread,
Jun 12, 2014, 11:24:40 PM6/12/14
to django...@googlegroups.com
Anyone?

Zemian Deng

unread,
Jul 3, 2014, 11:09:52 PM7/3/14
to django...@googlegroups.com
Hum... I am surprised that no one has experienced this warning msg yet, or maybe I can't catch anyone to reply.

For those are curious, I do now see mysql-connector-python 1.2.2 is available, and upgrading to this version got rid off these warnings.

cercatrova2

unread,
Jul 4, 2014, 12:54:38 AM7/4/14
to django...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a443d950-fe72-4380-bf61-1fc9c71c9af9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Zemian - I saw these warning messages too with 1.1.6 but indeed they went away with 1.2.2 about a month ago so I didn't post anything. Sorry but I didn't know of your message at the time.



Zemian Deng

unread,
Jul 4, 2014, 9:59:03 AM7/4/14
to django...@googlegroups.com
No problem. Thanks for the reply.


Aaron Abajian

unread,
Mar 1, 2015, 6:32:15 PM3/1/15
to django...@googlegroups.com
I was also getting these errors, upgrading resolved them for me as well.
Reply all
Reply to author
Forward
0 new messages