mod-wsgi

Apache + mod_wsgi + flask app: “Unable to get bucket brigade for request” error in logs

限于喜欢 提交于 2021-01-27 17:55:46
问题 I have a apache2/mod_wsgi/flask/python2.7 app. Sometimes such line appears in log file: Partial results are valid but processing is incomplete: [client 45.132.96.124:34500] mod_wsgi (pid=13920): Unable to get bucket brigade for request., referer: https://my-site.com/some_url/ What is "bucket brigade" and what this error actually means? Is it apache error or wsgi server error? What does lead to this error? If this is some unhandled exception - how to handle it and where? Thanks in advance. 回答1

Disable health-check logging in AWS ELB Django Application

放肆的年华 提交于 2021-01-27 05:12:42
问题 I have a Django application running on aws-elastic-beanstalk. I try to disable the logs caused by my health-checks. The health-checks are already routed to a seperate page. Elastic-beanstalk uses Apache + mod_wsgi. The following code is a solution that works with nginx servers. I try to create something similar for apache. I found out that conditional Logs are probably the appropriate way to do it with an Apache Server. My directory struture looks like the following /etc/httpd/ - conf - httpd

logging flask errors with mod_wsgi

孤街醉人 提交于 2021-01-27 04:10:11
问题 I've been trying to get this working since a long time but I'm really at my wits end now. I've tried to do everything that I could find on SO and flask documentation and still I cant a simple error log working so that I can debug my applcation. Below is the pasted code - # main.py from flask import Flask import logging app = Flask(__name__) file_handler = logging.FileHandler(filename='/tmp/election_error.log') file_handler.setLevel(logging.WARNING) app.logger.addHandler(file_handler) @app

logging flask errors with mod_wsgi

徘徊边缘 提交于 2021-01-27 04:09:11
问题 I've been trying to get this working since a long time but I'm really at my wits end now. I've tried to do everything that I could find on SO and flask documentation and still I cant a simple error log working so that I can debug my applcation. Below is the pasted code - # main.py from flask import Flask import logging app = Flask(__name__) file_handler = logging.FileHandler(filename='/tmp/election_error.log') file_handler.setLevel(logging.WARNING) app.logger.addHandler(file_handler) @app

Can't run Apache2 with virtualenv

此生再无相见时 提交于 2021-01-04 05:57:32
问题 I'm making a website based on Django, on the server was installed a Python 3.5, but my project requires a Python 3.6. I decided to use virtualenv. I successfuly installed needed version of Python but I can't make it works with Apatche2 using virtualenv . Website is able to run only on Python 2.7, otherwise nothing happens, page is loading for a long time without any error. Here is my VirtualHost config with my try to run on Python 3.6. <VirtualHost *:443> ServerName <site_adress>:443

Can't run Apache2 with virtualenv

人走茶凉 提交于 2021-01-04 05:57:22
问题 I'm making a website based on Django, on the server was installed a Python 3.5, but my project requires a Python 3.6. I decided to use virtualenv. I successfuly installed needed version of Python but I can't make it works with Apatche2 using virtualenv . Website is able to run only on Python 2.7, otherwise nothing happens, page is loading for a long time without any error. Here is my VirtualHost config with my try to run on Python 3.6. <VirtualHost *:443> ServerName <site_adress>:443

How to check if Python3 was built with '--enable-shared'?

六月ゝ 毕业季﹏ 提交于 2020-12-29 13:15:16
问题 Environment: Mac OS X 10.8.5 Apache 2.2.26 Homebrew Python 3.3.3 Problem: I am trying to install mod_wsgi but first need to determine if Python was configured and compiled with the '--enable-shared' option. Questions: How can I determine if Homebrew installed Python with the '--enable-shared' option? If it was not installed, what is the correct way to install it? Thank you! 回答1: From the python repl: import sysconfig sysconfig.get_config_vars('Py_ENABLE_SHARED') 来源: https://stackoverflow.com

How to check if Python3 was built with '--enable-shared'?

人盡茶涼 提交于 2020-12-29 13:13:22
问题 Environment: Mac OS X 10.8.5 Apache 2.2.26 Homebrew Python 3.3.3 Problem: I am trying to install mod_wsgi but first need to determine if Python was configured and compiled with the '--enable-shared' option. Questions: How can I determine if Homebrew installed Python with the '--enable-shared' option? If it was not installed, what is the correct way to install it? Thank you! 回答1: From the python repl: import sysconfig sysconfig.get_config_vars('Py_ENABLE_SHARED') 来源: https://stackoverflow.com

Flask app on non-root url of website with Apache2

…衆ロ難τιáo~ 提交于 2020-12-12 07:44:32
问题 I have a Flask app that I would like to host on a subdomain / non-root url of our lab website. For example, I want mylab.com/portal to lead to the flask app. I followed numerous guides but I keep getting a 404 error. My Directory structure: /var/www/ -html/ -Stuff for mylab.com -FlaskApp/ -FlaskApp.wsgi -FlaskApp/ -__init__.py -static/ -templates/ -... FlaskApp.wsgi: #!/usr/bin/python3 activate_this = '/home/cogsci-cnddcollab/FlaskApp/venv/bin/activate_this.py' with open(activate_this) as

Flask app on non-root url of website with Apache2

半腔热情 提交于 2020-12-12 07:44:06
问题 I have a Flask app that I would like to host on a subdomain / non-root url of our lab website. For example, I want mylab.com/portal to lead to the flask app. I followed numerous guides but I keep getting a 404 error. My Directory structure: /var/www/ -html/ -Stuff for mylab.com -FlaskApp/ -FlaskApp.wsgi -FlaskApp/ -__init__.py -static/ -templates/ -... FlaskApp.wsgi: #!/usr/bin/python3 activate_this = '/home/cogsci-cnddcollab/FlaskApp/venv/bin/activate_this.py' with open(activate_this) as