[sqlalchemy] MySQL server has gone away

2014-03-18 Thread Jameson Lee
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 that this 
value is below the MySQL timeout limit)

I believe the default is 3600 or 7200 seconds for the above values.

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


[sqlalchemy] Re: using Utf8 problem

2014-01-30 Thread Jameson Lee
I would highly encourage that you use utf8mb4 instead of utf8

http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html

On Thursday, January 30, 2014 7:57:40 AM UTC-8, Jeff Dairiki wrote:



 On Thursday, January 30, 2014 6:11:15 AM UTC-8, Alexander Peprepelica 
 wrote:

 I have such code

 engine = create_engine(u'mysql+mysqldb://
 login:pass@127.0.0.1:3307/mydb?charset=utf8use_unicode=1')

 in windows all is fine

 But when I execute code in linux I have problem with unicode
 What I do wrong?


 Can you be more specific as to what problem you are having?

 Not having much to go on my first guess is: What version of MySQLdb 
 (mysql-python) are you using?
 Current is 1.2.5.  If you're using a distribution-installed version what 
 you have may be quite a bit older.
 You probably want at least 1.2.3 (which fixed a memory leak having to do 
 with the handling of unicode
 values.)


-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sqlalchemy] multiple databases?

2013-12-10 Thread Jameson Lee
If you are using Flask, check out binds[1] with Flask-SQLAlchemy.

[1] http://pythonhosted.org/Flask-SQLAlchemy/binds.html

On Monday, December 9, 2013 12:33:46 PM UTC-8, warwickp wrote:

 Hi Richard

 There are no problems connecting to multiple database sources in the one 
 application - we do it all the time :-)

 Cheers
 Warwick

 On 10 Dec 2013, at 4:08 am, Richard Gerd Kuesters 
 ric...@humantech.com.brjavascript: 
 wrote:

  hi all,

 i don't know if anyone have to go through this, but here's a question: is 
 it possible to use multiple databases sources (like postgres and mysql) in 
 a single application?


 my best regards,
 richard. 

 -- 
 You received this message because you are subscribed to the Google Groups 
 sqlalchemy group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to sqlalchemy+...@googlegroups.com javascript:.
 To post to this group, send email to sqlal...@googlegroups.comjavascript:
 .
 Visit this group at http://groups.google.com/group/sqlalchemy.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.