gunicorn

Flask-Socketio takes extremely long to connect on Heroku

巧了我就是萌 提交于 2019-12-08 09:12:51
问题 All code works perfectly fine on my local machine, just not on Heroku. Have read through many issues on github / other errors on Flask-socketio and nothing seems to work. I left my browser running for about 20mins when using the eventlet setup and I saw the .on('connect') run correctly but none of the other parts of the code. Here's my current procfile: web: gunicorn -k geventwebsocket.gunicorn.workers.GeventWebSocketWorker -w 1 --chdir nickdima wsgi:app heroku features:enable http-session

gunicorn causing errors in heroku

蓝咒 提交于 2019-12-08 08:35:07
问题 I just pushed my app to heroku for the first time but keep getting an "Application Error" when I visit the page.. I'm not familiar with heroku and can't seem to find any reference in the help/dev center links. Going to the heroku logs I get this: C:\Users\XXX\Desktop\xxxxx.folder>heroku logs 2013-10-14T02:32:18.578976+00:00 heroku[api]: Enable Logplex by EMAIL@email.com 2013-10-14T02:32:18.597277+00:00 heroku[api]: Release v2 created by EMAIL@email.com 2013-10-14T02:32:46+00:00 heroku[slug

setup ssl on nginx for a django project

有些话、适合烂在心里 提交于 2019-12-08 07:02:20
问题 I want to setup ssl for nginx, my project is a django and i also use gunicorn as wsgi http server. I add following lines in my settings.py code : CSRF_COOKIE_SECURE = True SESSION_COOKIE_SECURE = True I don't know if it's necessary to do this, then i configure my nginx in the following form: upstream app_server { server 127.0.0.1:6000; // your gunicorn server } server { listen 80; server_name <name>; return 301 https://$host$request_uri; } server { #listen 80; listen 443 default ssl; client

gunicorn and django project (no app)

試著忘記壹切 提交于 2019-12-08 06:45:27
问题 I have a django project, and I want to deploy it with gunicorn/nginx. But I use settings.py urls.py views.py directly without start a django app, and gunicorn needs application name. How can I deploy a django project which has no app. 回答1: You don't need an application name with gunicorn_django command. just run gunicorn_django command in your projetc folder or tel him the path of settings http://gunicorn.org/run.html#gunicorn-django 来源: https://stackoverflow.com/questions/5375861/gunicorn

auto execute a web service in falcon

天涯浪子 提交于 2019-12-08 04:11:48
问题 I have a function which registers my web-services to spring-eureka discovery server but it automatically de-registers it. to solve this problem, I thought to make a function which will automatically execute in few seconds and register my service again and again. Please suggest what to do and if u have a better approach to encounter this problem that will be great. 回答1: We can make another program which will ping the health check URL of my web server. responsePythonAPI = requests.request("GET"

Django - gunicorn on App Engine. Error: 'No Module Named my_project'

故事扮演 提交于 2019-12-08 04:05:36
问题 I'm trying to upload my Django(v2.0) application to Google App Engine, but Gunicorn(v19.7.1) can't find my app. When I deploy my app using gcloud app deploy I get error 'No Module Named AppFlex' Full screenshot of the error and app.yaml config is below. The contents of the wsgi.py are: os.environ.setdefault("DJANGO_SETTINGS_MODULE", "AppFlex.settings") application = get_wsgi_application() Additionally, I can run the app locally using: gunicorn AppFlex.wsgi --workers 16 Another screenshot

ngnix + gunicorn throws truncated response body

大兔子大兔子 提交于 2019-12-08 02:32:38
问题 I request some json data by some url, sometimes it works fine and sometimes doesn't ... I looked another related cuestion here, but it seems to recommend not change content-length by middleware ... my json data incomplete is as image below shows: my app nginx config: server { listen 80; server_name myapp.com; access_log /var/log/nginx/myapp_access.log; error_log /var/log/nginx/myapp_error.log; location / { client_max_body_size 400M; proxy_read_timeout 120; proxy_connect_timeout 120; proxy_set

Why is nginx accepting requests with a Host header that doesn't match server_name?

眉间皱痕 提交于 2019-12-08 01:16:34
问题 I have a site set up this way: nginx as a proxy server, proxying requests tu a gunicorn instance serving a Django site through a UNIX socket. This is my nginx configuration: server { listen 80; server_name api.mysite.com; location /static/ { alias /webapps/mysite/static/; autoindex off; } location / { include proxy_params; proxy_pass http://unix:/webapps/mysite/mysite.sock; } } Is my understanding that nginx, when receiving a request, matches the Host header against the server_name parameter

Symlink causing Unknown job: gunicorn error

故事扮演 提交于 2019-12-07 22:49:49
问题 I followed the instructions given me here: https://stackoverflow.com/a/29371878/2532070 But the use of a symlink with my gunicorn.conf file is causing my startup script not to work, giving the Unknown job: gunicorn error . I've tried using init-checkconf /etc/init/gunicorn.conf which returns syntax ok . I'm guessing there's some kind of error with references or permissions but I can't figure it out via googling or searching here. Thanks for any help! 回答1: Symlinks don't automatically work if

Nginx Gunicorn one ip multiple django sites in folders

别等时光非礼了梦想. 提交于 2019-12-07 19:57:06
问题 thanks for reading my question. I'm trying to serve multiples Django sites on their own folders in one server without domain (only IP address) using Gunicorn and Nginx. Something like that: 20.20.20.20/demos/myapp1/ --> Django app 20.20.20.20/demos/myapp2/ --> Django app 20.20.20.20/demos/myapp3/ --> Django app I have tested a lot of settings but I can't make it work. When i tried to load URL 20.20.20.02/demos/myapp1/ i get a 404 not found error :( Example one site nginx conf: upstream app1