<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Cases (Posts about sqlalchemy)</title><link>https://fizyk.dev/</link><description></description><atom:link href="https://fizyk.dev/tags/sqlalchemy.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><lastBuildDate>Thu, 27 Nov 2025 12:02:28 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Reminder to use pool_recycle for SQLAlchemy's connection to mysql</title><link>https://fizyk.dev/blog/reminder-set-pool_recycle-for-sqlalchemys-connection-to-mysql/</link><dc:creator>Grzegorz Śliwiński</dc:creator><description>&lt;p&gt;This post is a reminder to myself and maybe other that will stumble upon
"&lt;strong&gt;Mysql server has gone away&lt;/strong&gt;" error with &lt;a class="reference external" href="http://docs.sqlalchemy.org"&gt;SQLAlchemy&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Recently, we had problem &lt;strong&gt;again&lt;/strong&gt; with MySQL and SQLAlchemy application, that it lost
connection, resulting in this error. While a colleague of mine started panicking,
I've started to remind myself, how did we solved it last time.&lt;/p&gt;
&lt;p&gt;Well.. the answer is simple, we used &lt;a class="reference external" href="http://docs.sqlalchemy.org/en/rel_0_9/core/pooling.html#setting-pool-recycle"&gt;pool_recycle&lt;/a&gt;
because mysql closes itself stale connections.&lt;/p&gt;
&lt;p&gt;I don't think this problem occurs with postgresql, at least I haven't seen it
anywhere with postgresql, but for MySQL it's certainly worth trying first
&lt;strong&gt;pool_recycle&lt;/strong&gt; option, and tuning pooling in general, before franticly browsing
internet for &lt;em&gt;possible&lt;/em&gt; cause of this broad error.&lt;/p&gt;</description><category>mysql</category><category>sqlalchemy</category><guid>https://fizyk.dev/blog/reminder-set-pool_recycle-for-sqlalchemys-connection-to-mysql/</guid><pubDate>Tue, 19 Aug 2014 20:02:27 GMT</pubDate></item><item><title>Testing web applications using SQLAlchemy.</title><link>https://fizyk.dev/blog/testing-web-applications-using-sqlalchemy/</link><dc:creator>Grzegorz Śliwiński</dc:creator><description>&lt;div&gt;&lt;p&gt;Some time ago, I decided to refactor &lt;a class="reference external" href="https://pypi.python.org/pypi/pyramid_fullauth"&gt;pyramid_fullauth&lt;/a&gt; tests from mostly unittest style
(though run by py.test) to same factor function style tests and base them on
&lt;a class="reference external" href="https://pypi.python.org/pypi/pytest_pyramid"&gt;pytest_pyramid&lt;/a&gt; package,
when it comes to test webapp. Everhything went smoothly,
until I stumbled upon &lt;a class="reference external" href="http://www.sqlalchemy.org/"&gt;SQLAlchemy&lt;/a&gt; session in tests.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://fizyk.dev/blog/testing-web-applications-using-sqlalchemy/"&gt;Read more…&lt;/a&gt; (2 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>fullauth</category><category>pytest-dbfixtures</category><category>python</category><category>sqlalchemy</category><guid>https://fizyk.dev/blog/testing-web-applications-using-sqlalchemy/</guid><pubDate>Wed, 09 Apr 2014 21:13:57 GMT</pubDate></item><item><title>SQLAlchemy 0.9 dialects speed tests</title><link>https://fizyk.dev/blog/sqlalchemy-09-dialects-speed-tests/</link><dc:creator>Grzegorz Śliwiński</dc:creator><description>&lt;div&gt;&lt;p&gt;This fourth &lt;a class="reference external" href="http://www.sqlalchemy.org/"&gt;SQLAlchemy's&lt;/a&gt; dialects speed tests aims to test this ORM's newest version, 0.9.x, which is available for about a month already. This version, amongst other improvements, contains C extension for python3.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://fizyk.dev/blog/sqlalchemy-09-dialects-speed-tests/"&gt;Read more…&lt;/a&gt; (2 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>mysql</category><category>postgresql</category><category>python</category><category>sqlalchemy</category><guid>https://fizyk.dev/blog/sqlalchemy-09-dialects-speed-tests/</guid><pubDate>Sun, 02 Feb 2014 21:14:23 GMT</pubDate></item><item><title>Year's end SQLAlchemy speed tests on postgres and mysql</title><link>https://fizyk.dev/blog/years-end-sqlalchemy-speed-tests-on-postgres-and-mysql/</link><dc:creator>Grzegorz Śliwiński</dc:creator><description>&lt;div&gt;&lt;p&gt;This third SQLAlchemy speed tests for various dialects is my third try, prompted by Tony Locke. Tony is a contributor to &lt;a class="reference external" href="https://pypi.python.org/pypi/pg8000"&gt;pg8000&lt;/a&gt; postgresql connector, which just recently got a huge overhaul and got a new version, after almost three years. I was happy to comply, as his request got me reason to work a little bit on my testing script as well, and automate the whole process.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://fizyk.dev/blog/years-end-sqlalchemy-speed-tests-on-postgres-and-mysql/"&gt;Read more…&lt;/a&gt; (3 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>mysql</category><category>postgresql</category><category>python</category><category>sqlalchemy</category><guid>https://fizyk.dev/blog/years-end-sqlalchemy-speed-tests-on-postgres-and-mysql/</guid><pubDate>Sun, 22 Dec 2013 13:11:33 GMT</pubDate></item><item><title>SQLAlchemy speed tests on postgres and mysql</title><link>https://fizyk.dev/blog/sqlalchemy-speed-tests-on-postgres-and-mysql/</link><dc:creator>Grzegorz Śliwiński</dc:creator><description>&lt;div&gt;&lt;p&gt;10 months ago, I run sqlalchemy tests against mysql server on different mysql dialects. This time, I did the same, but for both postgres and mysql dialects.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://fizyk.dev/blog/sqlalchemy-speed-tests-on-postgres-and-mysql/"&gt;Read more…&lt;/a&gt; (2 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>mysql</category><category>postgresql</category><category>python</category><category>sqlalchemy</category><guid>https://fizyk.dev/blog/sqlalchemy-speed-tests-on-postgres-and-mysql/</guid><pubDate>Thu, 29 Aug 2013 18:27:50 GMT</pubDate></item><item><title>sqlAlchemy speed tests on mysql-connector-python, mysqldb and oursql drivers</title><link>https://fizyk.dev/blog/sqlalchemy-speed-tests-on-mysql-connector-python-mysqldb-and-oursql-drivers/</link><dc:creator>Grzegorz Śliwiński</dc:creator><description>&lt;div&gt;&lt;p&gt;Some time ago, I decided to check, how sqlalchemy will cope with
different mysql drivers in terms of efficiency. At Red Sky, we used
&lt;a class="reference external" href="http://pypi.python.org/pypi/MySQL-python/1.2.4b5"&gt;MySQLdb&lt;/a&gt; for all
python projects, at least within our team. But MySQLdb requires
mysql-client library, and does some compiling during installation.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://fizyk.dev/blog/sqlalchemy-speed-tests-on-mysql-connector-python-mysqldb-and-oursql-drivers/"&gt;Read more…&lt;/a&gt; (5 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>mysql</category><category>python</category><category>sqlalchemy</category><guid>https://fizyk.dev/blog/sqlalchemy-speed-tests-on-mysql-connector-python-mysqldb-and-oursql-drivers/</guid><pubDate>Thu, 18 Oct 2012 21:10:15 GMT</pubDate></item></channel></rss>