error(10053, 'An established connection was aborted by the software in your host machine')

2,509 views
Skip to first unread message

Copper Lark

unread,
Jul 14, 2014, 7:06:03 AM7/14/14
to web...@googlegroups.com

Version

web2py™Version 2.9.5-trunk+timestamp.2014.03.29.21.54.41

Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
Traceback (most recent call last):
File "C:\web2py-m\gluon\main.py", line 539, in wsgibase
BaseAdapter.close_all_instances('rollback')
File "C:\web2py-m\gluon\dal.py", line 600, in close_all_instances
db._adapter.close(action)
File "C:\web2py-m\gluon\dal.py", line 580, in close
getattr(self, action)()
File "C:\web2py-m\gluon\dal.py", line 1923, in rollback
return self.connection.rollback()
File "C:\web2py-m\gluon\contrib\pymysql\connections.py", line 640, in rollback
self.errorhandler(None, exc, value)
File "C:\web2py-m\gluon\contrib\pymysql\connections.py", line 200, in defaulterrorhandler
raise Error(errorclass, errorvalue)
Error: (<class 'socket.error'>, error(10053, 'An established connection was aborted by the software in your host machine'))

In file: Framework

Copper Lark

unread,
Jul 14, 2014, 7:30:13 AM7/14/14
to web...@googlegroups.com
i use apache 

<type 'exceptions.RuntimeError'> Failure to connect, tried 5 times: Traceback (most recent call last): File "C:\web2py-m\gluon\dal.py", line 7848, in __init__ self._adapter = ADAPTERS[self._dbname](**kwargs) File "C:\web2py-m\gluon\dal.py", line 688, in __call__ obj = super(AdapterMeta, cls).__call__(*args, **kwargs) File "C:\web2py-m\gluon\dal.py", line 2731, in __init__ if do_connect: self.reconnect() File "C:\web2py-m\gluon\dal.py", line 669, in reconnect self.connection = f() File "C:\web2py-m\gluon\dal.py", line 2729, in connector return self.driver.connect(**driver_args) File "C:\web2py-m\gluon\contrib\pymysql\__init__.py", line 93, in Connect return Connection(*args, **kwargs) File "C:\web2py-m\gluon\contrib\pymysql\connections.py", line 575, in __init__ self._connect() File "C:\web2py-m\gluon\contrib\pymysql\connections.py", line 743, in _connect raise OperationalError(2003, "Can't connect to MySQL server on %r (%s)" % (self.host, e.args[0])) OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (10053)")

Version

web2py™Version 2.9.5-trunk+timestamp.2014.03.29.21.54.41

Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
Traceback (most recent call last
):
File "C:\web2py-m\gluon\restricted.py", line 220, in restricted
exec ccode in environment
File "C:/web2py-m/applications/ipay\compiled\models.db.py", line 28, in <module>
File "C:\web2py-m\gluon\dal.py", line 7870, in __init__
raise RuntimeError("Failure to connect, tried %d times:\n%s" % (attempts, tb))
RuntimeError: Failure to connect, tried 5 times:
Traceback (most recent call last
):
File "C:\web2py-m\gluon\dal.py", line 7848, in __init__
self._adapter = ADAPTERS[self._dbname](**kwargs)
File "C:\web2py-m\gluon\dal.py", line 688, in __call__
obj = super(AdapterMeta, cls).__call__(*args, **kwargs)
File "C:\web2py-m\gluon\dal.py", line 2731, in __init__
if do_connect: self.reconnect()
File "C:\web2py-m\gluon\dal.py", line 669, in reconnect
self.connection = f()
File "C:\web2py-m\gluon\dal.py", line 2729, in connector
return self.driver.connect(**driver_args)
File "C:\web2py-m\gluon\contrib\pymysql\__init__.py", line 93, in Connect
return Connection(*args, **kwargs)
File "C:\web2py-m\gluon\contrib\pymysql\connections.py", line 575, in __init__
self._connect()
File "C:\web2py-m\gluon\contrib\pymysql\connections.py", line 743, in _connect
raise OperationalError(2003, "Can't connect to MySQL server on %r (%s)" % (self.host, e.args[0]))
OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (10053)")

In file: C:\web2py-m\applications\ipay\compiled\models.db.pyc

1.
<code object <module> at 1AFB2188, file "C:/web2py-m/applications/ipay\compiled\models.db.py", line 17>

Powered by web2py™ created by Massimo Di Pierro ©2007-2014 - Admin language

Copper Lark

unread,
Jul 14, 2014, 8:43:12 AM7/14/14
to web...@googlegroups.com
[Mon Jul 14 15:33:33 2014] [warn] pid file C:/Program Files (x86)/Apache Software Foundation/Apache2.2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Mon Jul 14 15:33:37 2014] [notice] Apache/2.2.25 (Win32) mod_wsgi/3.5-BRANCH Python/2.7.6 mod_ssl/2.2.25 OpenSSL/0.9.8y PHP/5.4.20 configured -- resuming normal operations
[Mon Jul 14 15:33:37 2014] [notice] Server built: Jul 10 2013 01:52:12
[Mon Jul 14 15:33:37 2014] [notice] Parent: Created child process 2484
...
[Mon Jul 14 14:02:48 2014] [error] [client 91.220.93.136] IOError: failed to write data, referer: http://ipo-polza.ru/progs
[Mon Jul 14 14:06:10 2014] [error] [client 91.220.93.136] mod_wsgi (pid=4332): Exception occurred processing WSGI script 'C:/web2py-m/wsgihandler.py'., referer: http://ipo-polza.ru/transs


Niphlod

unread,
Jul 14, 2014, 8:44:41 AM7/14/14
to web...@googlegroups.com
so, you figured out that you can't connect to mysql. did you try to see if it's reachable ?

Copper Lark

unread,
Jul 15, 2014, 3:04:20 PM7/15/14
to web...@googlegroups.com
How I may resolve this error mySQL?

понедельник, 14 июля 2014 г., 16:44:41 UTC+4 пользователь Niphlod написал:

Copper Lark

unread,
Jul 15, 2014, 3:08:22 PM7/15/14
to web...@googlegroups.com
I found: Socket->Close();
but in web2py how to close mySQL connections?

вторник, 15 июля 2014 г., 23:04:20 UTC+4 пользователь Copper Lark написал:

Massimo Di Pierro

unread,
Jul 16, 2014, 7:45:15 AM7/16/14
to web...@googlegroups.com
This is not the problem. You should not close connections in web2py. web2py may need to recycle them in the connection pool.
Can you connect to your database via other means? For example the python shell or the web2py shell?

Dmitry Ermolaev

unread,
Jul 18, 2014, 8:04:04 AM7/18/14
to web...@googlegroups.com
in web2py shell, when I open DB urls:
this error occurred ((

sometimes mySQL rise this error in random
and I restart server (Windirs server 2008 R2)
than all work fine about 2-3 days
than error occure again (

среда, 16 июля 2014 г., 15:45:15 UTC+4 пользователь Massimo Di Pierro написал:

Dmitry Ermolaev

unread,
Jul 18, 2014, 11:39:50 PM7/18/14
to web...@googlegroups.com

350 errors for 5 hours work ((

why?

if I use LOAD(... ajax=True)

{{=LOAD('where', 'for_addr.load', vars={'addr': addr}, ajax=True, times=100, timeout=20000,

    content=IMG(_src=URL('static','images/loading.gif'), _width=48))}}

Dmitry Ermolaev

unread,
Jul 19, 2014, 12:09:17 AM7/19/14
to web...@googlegroups.com
in mySQL ipay.err
=============================
2014-07-19 07:53:07 1512 [Warning] C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld: Forcing close of thread 1933  user: 'root'

2014-07-19 07:53:07 1512 [Warning] C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld: Forcing close of thread 1921  user: 'root'

2014-07-19 07:53:07 1512 [Warning] C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld: Forcing close of thread 1928  user: 'root'


Dmitry Ermolaev

unread,
Jul 19, 2014, 12:11:28 AM7/19/14
to web...@googlegroups.com

2014-07-19 07:53:32 1560 [Note] Plugin 'FEDERATED' is disabled.
2014-07-19 07:53:32 648 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2014-07-19 07:53:32 1560 [Note] InnoDB: Using atomics to ref count buffer pool pages
2014-07-19 07:53:32 1560 [Note] InnoDB: The InnoDB memory heap is disabled
2014-07-19 07:53:32 1560 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2014-07-19 07:53:32 1560 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-07-19 07:53:32 1560 [Note] InnoDB: Not using CPU crc32 instructions
2014-07-19 07:53:32 1560 [Note] InnoDB: Initializing buffer pool, size = 8.0M
2014-07-19 07:53:32 1560 [Note] InnoDB: Completed initialization of buffer pool
2014-07-19 07:53:32 1560 [Note] InnoDB: Highest supported file format is Barracuda.
2014-07-19 07:53:36 1560 [Note] InnoDB: 128 rollback segment(s) are active.
2014-07-19 07:53:36 1560 [Note] InnoDB: Waiting for purge to start
2014-07-19 07:53:36 1560 [Note] InnoDB: 5.6.16 started; log sequence number 940666479
2014-07-19 07:53:36 1560 [Note] Server hostname (bind-address): '*'; port: 3306
2014-07-19 07:53:36 1560 [Note] IPv6 is available.
2014-07-19 07:53:36 1560 [Note]   - '::' resolves to '::';
2014-07-19 07:53:36 1560 [Note] Server socket created on IP: '::'.
2014-07-19 07:53:37 1560 [Note] Event Scheduler: Loaded 0 events
2014-07-19 07:53:37 1560 [Note] C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld: ready for connections.
Version: '5.6.16-log'  socket: ''  port: 3306  MySQL Community Server (GPL)

Dmitry Ermolaev

unread,
Jul 21, 2014, 12:55:43 AM7/21/14
to web...@googlegroups.com
 I read mySQL stats When it error rise again:
connections = 60

I restart Apache
and connections falls to 5 and error 10053 disappeared.

 In my db.py -
    pool_size=25,
    #migrate=True,
    migrate=False,
    migrate_enabled=False,
    check_reserved=['all'],


Why mySQL connection not closed?




Dmitry Ermolaev

unread,
Jul 21, 2014, 1:02:34 AM7/21/14
to web...@googlegroups.com
error appeared again. mySQL connections 27. I stopped the Apachi server but the connection still remained =27. I restart the mySQL database server and connections dropped to 4

Dmitry Ermolaev

unread,
Jul 25, 2014, 12:34:20 AM7/25/14
to web...@googlegroups.com
SOLVED!
I update mySQL to 5.6.19 vers!


понедельник, 14 июля 2014 г., 15:06:03 UTC+4 пользователь Copper Lark написал:

Derek

unread,
Jul 25, 2014, 2:58:20 PM7/25/14
to web...@googlegroups.com
Glad you fixed it, sorry to hear you are stuck with mySQL. your my.cnf file controls how many connections are allowed.

Dmitry Ermolaev

unread,
Jul 28, 2014, 2:58:23 AM7/28/14
to web...@googlegroups.com
error is back ((

this error occurred when I open SITE - not application! Why?

This error rised anytime anywhere ((

If I restart mySQL and Apachi - and in mySQL I see only 6 connections - error sometimes rise again! ((

Error ticket for "admin"

Ticket ID

127.0.0.1.2014-07-28.10-52-17.93984b6a-6e9f-4579-8758-99edc97008f7

Dmitry Ermolaev

unread,
Jul 28, 2014, 3:02:07 AM7/28/14
to web...@googlegroups.com
in mySQL ty: 
SHOW GLOBAL STATUS LIKE 'Aborted_connects';
result = 1 

what does it mean?

Dmitry Ermolaev

unread,
Jul 28, 2014, 3:10:48 AM7/28/14
to web...@googlegroups.com
but another site
that used same mySQL instance -  does not have this error

but sites on web2py:
https://7pay.in
has this error

It's mean error in the implementation of the framework

I use in Apachi conf:
WSGIScriptAlias / "C:/web2py-m/wsgihandler.py"
+ python 2.7

Dmitry Ermolaev

unread,
Jul 28, 2014, 3:13:18 AM7/28/14
to web...@googlegroups.com
in http.conf:
# need: Python2.7 win32
LoadModule wsgi_module modules\mod_wsgi-3.4.ap22.win32-py2.7.so

понедельник, 28 июля 2014 г., 11:10:48 UTC+4 пользователь Dmitry Ermolaev написал:

Derek

unread,
Jul 28, 2014, 5:08:11 PM7/28/14
to web...@googlegroups.com
You are using apache on windows?

Dmitry Ermolaev

unread,
Jul 29, 2014, 1:14:55 AM7/29/14
to web...@googlegroups.com
Yes - its free

вторник, 29 июля 2014 г., 1:08:11 UTC+4 пользователь Derek написал:
Reply all
Reply to author
Forward
0 new messages