<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Yev</title>
    <description>The latest articles on DEV Community by Yev (@yev).</description>
    <link>https://dev.to/yev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F128473%2F26fc92d2-4c36-4e66-b0a1-7fe4f75d935d.jpg</url>
      <title>DEV Community: Yev</title>
      <link>https://dev.to/yev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yev"/>
    <language>en</language>
    <item>
      <title>Ask dev.to - struggle with flask+sqlalchemy</title>
      <dc:creator>Yev</dc:creator>
      <pubDate>Thu, 20 Jun 2019 16:06:33 +0000</pubDate>
      <link>https://dev.to/yev/ask-dev-to-struggle-with-flask-sqlalchemy-1e33</link>
      <guid>https://dev.to/yev/ask-dev-to-struggle-with-flask-sqlalchemy-1e33</guid>
      <description>&lt;p&gt;Hello! Need some help from the bright minds of dev.to 🙏 Recently I started to implement a backend for my project using flask + sqlalchemy (postgres + pgbouncer) + gunicorn. The problem is, that it performs only ~1 request per second... I started to play with the gunicorn config and set 5 gevent workers, 🙈 monkey patched psycorp2 (the driver for postgres). Didn't work. Okay, maybe sqlalchemy blocks the main thread and the app performs poorly. So I switched to 5 sync workers. Now at least it should give me 5 RPS... Not this time. After some investigation, I found out that the bottleneck was between my web app and the db. pg bouncer (47 connections) and postgres are hosted on digital ocean, so I believe the guys made the right settings for me. The only thing that is left is sqlalchemy and how it handles sessions (and my hands which wrote the code). Maybe somebody had a similar issue or can give advice where to look further? Thank you in advance, you're awesome 💚&lt;/p&gt;

</description>
      <category>flask</category>
      <category>gunicorn</category>
      <category>postgres</category>
      <category>sqlalchemy</category>
    </item>
  </channel>
</rss>
