On Wed, Jun 15, 2016 at 7:27 AM, Jeffrey Yunes wrote:
> Hi all,
> After successful queries and a 10 minute wait, I'm getting the popular
> "MySQL server has gone away." I have a single-threaded app and my
> pool_recycle is way less than my wait_timeout.
>
> Do I need to create a
Hi Mike and all,
So, mostly good news.
First to answer your question, I'm not aware of any long standing
queries. During the 10 minutes between queries, `SHOW PROCESSLIST`
indicates there are no queries running (two sleeping). The only remotely
suspicious thing in the query log is a `BEGIN
not really. Are you leaving a long-running transaction open and not
closing it (or rolling back / committing) ?
On 06/14/2016 07:06 PM, Jeffrey Yunes wrote:
Sorry, no dice!
I switched to pymysql.
I'm connecting via 127.0.0.1, so I don't think it's a network issue.
Pretty much the same
Sorry, no dice!
I switched to pymysql.
I'm connecting via 127.0.0.1, so I don't think it's a network issue.
Pretty much the same error...
Any thoughts?
2016-06-14 15:45:20,889 INFO sqlalchemy.engine.base.Engine SHOW
VARIABLES LIKE 'sql_mode'
...
2016-06-14 15:56:42,530 INFO
Well I'd get off of OurSQL to start with since it is unmaintained for
years now. The "gone away" error doesn't always mean the connection
was actually dropped, in some old school situations it just means the
client got out of sync with the MySQL protocol.
( waits )
still broken?
Hi all,
After successful queries and a 10 minute wait, I'm getting the popular
"MySQL server has gone away." I have a single-threaded app and my
pool_recycle is way less than my wait_timeout.
Do I need to create a new session after the pool recycles? I'd love to know
which part of the docs
Today I found the following traceback in my logs:
2014-03-27 13:55:59,876 ERROR [sqlalchemy.pool.QueuePool _close_connection
b'uWSGIWorker2Core14'] Exception closing connection oursql.Connection
object at 0x7fecfdf6a140
Traceback (most recent call last):
File
On Mar 27, 2014, at 10:03 AM, Tim Tisdall tisd...@gmail.com wrote:
Today I found the following traceback in my logs:
2014-03-27 13:55:59,876 ERROR [sqlalchemy.pool.QueuePool _close_connection
b'uWSGIWorker2Core14'] Exception closing connection oursql.Connection object
at 0x7fecfdf6a140
Ah, yeah, that seems like a reasonable way of handling it.
I just don't get why I'm getting those exceptions, though, as I have it set
to recycle pool connections every 4 hrs where the mysql setting is to
expire connections after 8hrs. As far as I understand it, I shouldn't be
getting messages
what this looks like is that the connection is closed by the server due to the
MySQL timeout, then SQLAlchemy's pool, when accessed, goes to recycle those
connections, and does a close() on the existing one. Since they've been closed
server side, the close() method raises. The pool
Hi all,
I hit a problem when using sqlalchemy operates mysql.
Engine.execute hangs about 5 mins... and then, get error:
'MySQL server has gone away' or 'Lost connection to MySQL server during
query'.
Actually, when operation hangs, I login mysql server is OK.
Why this happened?
Or how to
Your connection to the database has been idle for too long and MySQL has
disconnected it. You can mitigate it by having fake traffic that will use the
connection. Increasing the timeout of MySQL. Set SQLAlchemy to recycle
connections in the connection pool more aggressively (and make sure
One way I resolved this is, periodic dummy query 'select 1' to make sure
connection is held.
Using Tornado, I do something like following in my models.
class Db(object):
def __init__(self):
engine_string =
'mysql'+'://'+options.mysql_user+':'+options.mysql_password+'@
Hi all,
I hit a problem when use sqlalchemy with mysql.
I found the problem is mysql's auto close to nonactive connection over 8
hours.
And , I googled a lot and find pool_recycle option for create_engine.
But seems does not work.
Here is my code:
engine = create_engine(db_url,
pool_recycle applies to when the connection is checked in, and then you check
it out. if the connection is older than N seconds, it gets recycled out before
being returned.
on the other hand, if you check out a connection and just hold onto it for
hours, it’ll time out.
other than that
Hi,
I have fallowing error, with SQLAlchemy 0.7.4.
This is my trackback:
2011-12-17 14:08:55,730 INFO sqlalchemy.pool.QueuePool Invalidate
connection _mysql.connection open to 'sql.wmasg.pl' at 3a79730
(reason: OperationalError:(2006, 'MySQL server has gone away'))
2011-12-17 14:08:55,731 INFO
On Dec 17, 2011, at 8:16 AM, Sharpek wrote:
Hi,
I have fallowing error, with SQLAlchemy 0.7.4.
This is my trackback:
2011-12-17 14:08:55,730 INFO sqlalchemy.pool.QueuePool Invalidate
connection _mysql.connection open to 'sql.wmasg.pl' at 3a79730
(reason: OperationalError:(2006,
On Aug 23, 2011, at 11:21 PM, limodou wrote:
On Sat, Oct 23, 2010 at 9:22 PM, Michael Bayer mike...@zzzcomputing.com
wrote:
pool recycle means a connnection that is 3600 seconds old will be thrown
away. does not help with reconnects.
When a server gone away error is detected, the
On Wed, Aug 24, 2011 at 9:49 PM, Michael Bayer mike...@zzzcomputing.com wrote:
On Aug 23, 2011, at 11:21 PM, limodou wrote:
On Sat, Oct 23, 2010 at 9:22 PM, Michael Bayer mike...@zzzcomputing.com
wrote:
pool recycle means a connnection that is 3600 seconds old will be thrown
away. does
On Aug 24, 2011, at 10:04 AM, limodou wrote:
finally I found the problem. In my case I build my own ORM based on
sqlalchemy, I call it uliorm. And it only use base select, update,
insert, delete statements. And in order to keep the whole process can
share the same connection object, I used
On Sat, Oct 23, 2010 at 9:22 PM, Michael Bayer mike...@zzzcomputing.com wrote:
pool recycle means a connnection that is 3600 seconds old will be thrown
away. does not help with reconnects.
When a server gone away error is detected, the entire connection pool is
thrown away and rebuilt.
Hi Guys,
One of our MySQL servers crashed yesterday. After we recovered it, a
small SQLAlchemy-based app we have running against it kept throwing
'MySQL server has gone away' even though we have pool_recycle set to 3600.
Any ideas why that might be?
Curious as to why SA doesn't try and
pool recycle means a connnection that is 3600 seconds old will be thrown away.
does not help with reconnects.
When a server gone away error is detected, the entire connection pool is
thrown away and rebuilt. So assuming one engine, you'd get this error once for
each connection that is
23 matches
Mail list logo