title: SQLAlchemy error MySQL server has gone away
body: <p>Error <code>OperationalError: (OperationalError) (2006, 'MySQL server has gone away')</code> i'm already received this error when i coded project on Flask, but i cant understand why i get this error. </p>
  
  <p>I have code (yeah, if code small and executing fast, then no errors) like this \</p>
  
  <pre><code>db_engine = create_engine('mysql://root@127.0.0.1/mind?charset=utf8', pool_size=10, pool_recycle=7200)
  Base.metadata.create_all(db_engine)
  
  Session = sessionmaker(bind=db_engine, autoflush=True)
  Session = scoped_session(Session)
  session = Session()
  
  # there many classes and functions
  
  session.close()
  </code></pre>
  
  <p>And this code returns me error <code>'MySQL server has gone away'</code>, but return it after some time, when i use pauses in my script. </p>
  
  <p>Mysql i use from openserver.ru (it's web server like such as wamp).</p>
  
  <p>Thanks.. </p>