uwsgi

uwsgi throws IO error caused by uwsgi_response_write_body_do broken pipe

匿名 (未验证) 提交于 2019-12-03 02:00:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My application is a uwsgi+django setup. I use gevent to do performance testing and run 1200 requests concurrently. At this point, uwsgi will throw an IO error with the following log message: uwsgi_response_write_body_do(): Broken pipe [core/writer.c line 260] IOError: write error Django 1.4.0 uwsgi: 1.9.13 python: 2.6 TCP Listen queue: 1000 What is the cause of this broken pipe error? 回答1: This can happen when NGINX started a request to uWSGI but uWSGI took too long to respond, then NGINX closes the connection to uWSGI. When uWSGI finally

uwsgi invalid request block size

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm running uwsgi in emperor mode uwsgi --emperor /path/to/vassals/ --buffer-size=32768 and getting this error invalid request block size: 21327 (max 4096)...skip What to do?? I also tried -b 32768 回答1: I aslo ran into same issue while following some tutorial. The problem was that I set the option socket = 0.0.0.0:8000 instead of http = 0.0.0.0:8000 . socket option intended to be used with some third-party router (nginx for instance), while when http option is set uwsgi can accept incoming HTTP requests and route them by itself. 回答2: The

Permission denied - nginx and uwsgi socket

匿名 (未验证) 提交于 2019-12-03 01:55:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Well I am currently trying to get my django application served using nginx and uwsgi. I am currently using a virtual environment to which uwsgi is installed. However I am currently getting a 502 bad gateway error when attempting to access the page. The Error I am experiencing. 2014/02/27 14:20:48 [crit] 29947#0: *20 connect() to unix:///tmp/uwsgi.sock failed (13: Permission denied) while connecting to upstream, client: 144.136.65.176, server: domainname.com.au, request: "GET /favicon.ico HTTP/1.1", upstream: "uwsgi://unix:///tmp/uwsgi.sock:"

Flask and uWSGI - unable to load app 0 (mountpoint='') (callable not found or import error)

匿名 (未验证) 提交于 2019-12-03 01:51:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I get the below error when I try and start Flask using uWSGI. Here is how I start: > # cd .. > root@localhost:# uwsgi --socket 127.0.0.1:6000 --file /path/to/folder/run.py --callable app - -processes 2 Here is my directory structure: -/path/to/folder/run.py -|app -|__init__.py -|views.py -|templates -|static Contents of /path/to/folder/run.py if __name__ == '__main__': from app import app #app.run(debug = True) app.run() Contents of /path/to/folder/app/__init__.py import os from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy

uwsgi + Flask + virtualenv ImportError: no module named site

不打扰是莪最后的温柔 提交于 2019-12-03 01:42:26
(Other posts on SO are similar, but none have the specific combination of uwsgi + Flask + virtualenv) ( This one is closest ) I installed uwsgi via apt-get. I also tried pip install wsgi. Both gave me the same issue. Test command: sudo uwsgi -s /tmp/uwsgi.sock -w myapp:app -H myvirtualenv Result: Python version: 2.7.4 (default, Apr 19, 2013, 18:35:44) [GCC 4.7.3] Set PythonHome to myvirtualenv ImportError: No module named site I can otherwise run my app in the virtual env. hughes See the answer from @JRajan first. If you're sure you just want to suppress the error and not actually solve the

bottle uwsgi nginx app returns 404

匿名 (未验证) 提交于 2019-12-03 01:40:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: OK, I've gone around and around on this and don't know what else to do: maybe someone can help. I'm trying to run a bottle app via uwsgi and nginx. It works fine if I run it with the bottle server, like this; python app.py and then point a browser to hostname:8080 but when run via nginx/uwsgi, and go to: hostname/apps/app1 I get the 404 error handler WITHIN THE APP, which reports a 404 error. So it's running the app: it just doesn't seem to match any of the route "decorators". Here's the app code, which resides in /mnt/wd/www/dev/apps/app1

uWSGI Server log…permission denied to read file…which file?

匿名 (未验证) 提交于 2019-12-03 01:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a server running Django/Nginx/uWSGI with uWSGI in emperor mode, and the error log for it (the vassal-level error log, not the emperor-level log) has a continual permissions error every time it spawns a new worker, like so: Tue Jun 26 19:34:55 2012 - Respawned uWSGI worker 2 (new pid: 9334) Error opening file for reading: Permission denied Problem is, I don't know what file it's having trouble opening; it's not the log file, obviously, since I'm looking at it and it's writing to that without issue. Any way to find out? I'm running the

Easy application logging/debugging with nginx, uwsgi, flask?

房东的猫 提交于 2019-12-03 01:15:18
I'm not looking to turn on the dangerous debugging console , but my application is getting a 500 error and doesn't seem to be writing any output for me to investigate more deeply. I saw this exchange on the mailing list , which led me to this page on logging errors . However, I still find this very confusing and have a couple of questions: (1) In which file should the stuff below go? ADMINS = ['yourname@example.com'] if not app.debug: import logging from logging.handlers import SMTPHandler mail_handler = SMTPHandler('127.0.0.1', 'server-error@example.com', ADMINS, 'YourApplication Failed')

uWSGI can not load libssl.1.0.0.dylib

匿名 (未验证) 提交于 2019-12-03 01:14:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When I call uwsgi , it always shows the following: dyld: Library not loaded: libssl.1.0.0.dylib Referenced from: /Users/xingshi/anaconda/bin/uwsgi Reason: image not found Trace/BPT trap: 5 Here is all the libssl.1.0.0.dylib on my Mac: $ locate libssl.1.0.0.dylib /Library/PostgreSQL/9.2/lib/libssl.1.0.0.dylib /Library/PostgreSQL/9.2/pgAdmin3.app/Contents/Frameworks/libssl.1.0.0.dylib /Users/xingshi/anaconda/lib/libssl.1.0.0.dylib /Users/xingshi/anaconda/pkgs/openssl-1.0.1c-0/lib/libssl.1.0.0.dylib /opt/local/lib/libssl.1.0.0.dylib And my

uwsgi throws IO error caused by uwsgi_response_write_body_do broken pipe

匿名 (未验证) 提交于 2019-12-03 01:10:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My application is a uwsgi+django setup. I use gevent to do performance testing and run 1200 requests concurrently. At this point, uwsgi will throw an IO error with the following log message: uwsgi_response_write_body_do(): Broken pipe [core/writer.c line 260] IOError: write error Django 1.4.0 uwsgi: 1.9.13 python: 2.6 TCP Listen queue: 1000 What is the cause of this broken pipe error? 回答1: This can happen when NGINX started a request to uWSGI but uWSGI took too long to respond, then NGINX closes the connection to uWSGI. When uWSGI finally