<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>How do you determine that a user is authenticated? I suspect that currently your application stores information individually on each of the Gunicorn workers processes memory so it is different on each of them. <br></div>
<div><br></div>
<div>I found these links that can help you understand what can be wrong on our app:<br></div>
<div><br></div>
<div><a href="http://stackoverflow.com/questions/27240278/sharing-memory-in-gunicorn">http://stackoverflow.com/questions/27240278/sharing-memory-in-gunicorn</a><br></div>
<div><a href="http://stackoverflow.com/questions/34172964/persistent-db-connection-in-django-wsgi-application">http://stackoverflow.com/questions/34172964/persistent-db-connection-in-django-wsgi-application</a><br></div>
<div><br></div>
<div>You could either re-architect your app or look at doing something like this, mentioned on the first link:<br></div>
<div><br></div>
<blockquote><div dir="ltr">Alternatively, you could use a <a href="http://stackoverflow.com/questions/26854594/sharing-static-global-data-among-processes-in-a-gunicorn-flask-app">memory-mapped file</a> (if you can wrap the shared memory with your custom data structure), <a href="http://stackoverflow.com/questions/26854594/sharing-static-global-data-among-processes-in-a-gunicorn-flask-app">gevent with gunicorn</a> to ensure that you're only using one <i>process</i>, or <a href="http://stackoverflow.com/questions/16366124/share-a-numpy-array-in-gunicorn-processes">the multi-processing module to spin up your own data-structure server</a> which you connect to using IPC.<br></div>
</blockquote><div><br></div>
<div id="sig38188977"><div class="signature">-- unai<br></div>
</div>
<div><br></div>
<div><br></div>
<div>On Tue, Jan 10, 2017, at 03:57 PM, 王帅 wrote:<br></div>
<blockquote type="cite"><div name="messageBodySection" style="font-size:14px;font-family:-apple-system,BlinkMacSystemFont,sans-serif;"><div>Thanks for your reply. <br></div>
<div><br></div>
<div>I use MySQL database behind Flask-SQLAlchemy. The full example app host at <a href="https://github.com/stamaimer/MPWeChatRSS">https://github.com/stamaimer/MPWeChatRSS</a>.<br></div>
</div>
<div name="messageReplySection" style="font-size:14px;font-family:-apple-system,BlinkMacSystemFont,sans-serif;"><div><br></div>
<div>On 10 Jan 2017, 3:41 PM +0800, Jiri Kuncar <notifications@github.com>, wrote:<br></div>
<div> <br></div>
<blockquote type="cite" style="margin-top:5px;margin-right:5px;margin-bottom:5px;margin-left:5px;padding-left:10px;border-left-width:thin;border-left-style:solid;border-left-color:rgb(26, 188, 156);"><p>Can you provide full example app? Is it possible that you are using SQLite in-memory database?<br></p><p style="-moz-text-size-adjust: none;"><span class="colour" style="color:rgb(102, 102, 102)"><span class="size" style="font-size:small">—<br> You are receiving this because you authored the thread.<br> Reply to this email directly, <a href="https://github.com/mattupstate/flask-security/issues/579#issuecomment-271507035">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ADlNSm1ukQPA_l-41OCf7bJDzFPXBspmks5rQzY4gaJpZM4LfB9k">mute the thread</a>.<img alt="" src="https://www.fastmailusercontent.com/proxy/2be69db18000d95f8e564c616c35778f21ef28892244cfc8cc86b1187af76b50/8647470737a3f2f2769647865726e236f6d6f2e6f64796669636164796f6e637f226561636f6e6f21444c6e435e636362535b4854513c477340303c66444e4836454572484542567b637532715a795437616a407a5d443c4662493b6e2769666/ADlNSnccRSKXT1LwC00lFDN8FEuBHERvks5rQzY4gaJpZM4LfB9k.gif" width="1" height="1"></span></span></p><div><div><br></div>
</div>
</blockquote></div>
<div><u>_______________________________________________</u><br></div>
<div>Flask mailing list<br></div>
<div><a href="mailto:Flask@python.org">Flask@python.org</a><br></div>
<div><a href="https://mail.python.org/mailman/listinfo/flask">https://mail.python.org/mailman/listinfo/flask</a><br></div>
</blockquote><div><br></div>
</body>
</html>