[Flask] Particular order for starting Nginx/UWSGI?

Alex Hall ahall at autodist.com
Tue May 10 20:12:14 EDT 2016


Yep, you got me. Unix sockets, because I read they're faster, and because punching holes in the Google Cloud firewall is a pain/must be approved by my boss. :) Although, maybe it won't need holes if it's all based on localhost--that's a good thought. I'll switch over to HTTP sockets tomorrow and see if that makes a difference. Thanks.
> On May 10, 2016, at 18:23, Anthony Ford <ford.anthonyj at gmail.com> wrote:
> 
> As far as I know, only the uWSGI process creates the sockets. Are you using unix sockets or network sockets? 
> 
> Every time I've tried to get unix socks working, I've run into a permissions issue, and I've never had enough time to figure it out. Perhaps someone else on the list can point you in the right way.  Maybe you can try chmoding to 777 and see if that helps.
> 
> I usually go for network sockets bound to 127.0.0.1 for security ("socket = 127.0.0.1:7000 <http://127.0.0.1:7000/>"). If you are using unix socks, you might also try the chown-socket and chmod-socket commands and set to the user/group your web server runs as (usually something like www or nginx) and a 660, 666, or 777.
> 
> 
> 
> Anthony Ford,
> KF5IBN,
> ford.anthonyj at gmail.com <mailto:ford.anthonyj at gmail.com>
> On Tue, May 10, 2016 at 4:40 PM, Alex Hall <ahall at autodist.com <mailto:ahall at autodist.com>> wrote:
> Hi all,
> I'm suddenly getting errors, where the socket used by Nginx and UWSGI isn't reachable because of permission problems. This didn't happen until I restarted both services (Nginx was acting up; I didn't restart it to try to restart my app). Is there a specific order in which these pieces have to be started or stopped to avoid problems, or is this something different? I didn't change the socket details in any configuration file, so it almost has to be the restarting of both services. Thanks.
> 
> -- 
> Alex Hall
> Automatic Distributors, IT department
> ahall at autodist.com <mailto:ahall at autodist.com>
> 
> _______________________________________________
> Flask mailing list
> Flask at python.org <mailto:Flask at python.org>
> https://mail.python.org/mailman/listinfo/flask <https://mail.python.org/mailman/listinfo/flask>
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20160510/e315992a/attachment-0001.html>


More information about the Flask mailing list