Note that there are some explanatory texts on larger screens.

plurals
  1. POuwsgi failing to start on Heroku?
    primarykey
    data
    text
    <p>I'm trying to deploy Django to Heroku (cedar stack) with uwsgi as my app server.</p> <p>I've tried several configurations I've used successfully with deployments on dedicated servers. However, Heroku keeps complaining that uwsgi isn't listening on the correct port, even though I'm using the $PORT env variable in my Procfile.</p> <h3>Procfile</h3> <pre><code>web: uwsgi --http :$PORT --home $HOME --ini conf/uwsgi.ini </code></pre> <h3>conf/uwsgi.ini</h3> <p>(Note that I've tried a bunch of configuration tweaks, this is the simplest one that I've tried, always the same error about the wrong PORT number.)</p> <pre><code>env = DJANGO_SETTINGS_MODULE=retargeting.settings module = django.core.handlers.wsgi:WSGIHandler() </code></pre> <h3>Here is the output from my heroku logs:</h3> <pre><code>2012-03-30T17:36:09+00:00 heroku[slugc]: Slug compilation finished2012-03-30T17:36:13+00:00 heroku[web.1]: Starting process with command `uwsgi --http :3810 --home /app --ini conf/uwsgi.ini` 2012-03-30T17:36:13+00:00 app[web.1]: [uWSGI] getting INI configuration from conf/uwsgi.ini 2012-03-30T17:36:13+00:00 app[web.1]: *** Starting uWSGI 1.1.2 (64bit) on [Fri Mar 30 17:36:13 2012] *** 2012-03-30T17:36:13+00:00 app[web.1]: compiled with version: 4.4.3 on 30 March 2012 03:51:49 2012-03-30T17:36:13+00:00 app[web.1]: current working directory: /app 2012-03-30T17:36:13+00:00 app[web.1]: detected binary path: /app/bin/uwsgi 2012-03-30T17:36:13+00:00 app[web.1]: *** WARNING: you are running uWSGI without its master process manager *** 2012-03-30T17:36:13+00:00 app[web.1]: your memory page size is 4096 bytes 2012-03-30T17:36:13+00:00 app[web.1]: detected max file descriptor number: 10000 2012-03-30T17:36:13+00:00 app[web.1]: lock engine: pthread mutexes 2012-03-30T17:36:13+00:00 app[web.1]: uWSGI http bound on :3810 fd 4 2012-03-30T17:36:13+00:00 app[web.1]: spawned uWSGI http 1 (pid: 4) 2012-03-30T17:36:13+00:00 app[web.1]: uwsgi socket 0 bound to TCP address 127.0.0.1:43681 (port auto-assigned) fd 3 2012-03-30T17:36:13+00:00 app[web.1]: Python version: 2.7.2 (default, Oct 31 2011, 16:22:04) [GCC 4.4.3] 2012-03-30T17:36:13+00:00 app[web.1]: Set PythonHome to /app 2012-03-30T17:36:13+00:00 app[web.1]: Python main interpreter initialized at 0x134c5d0 2012-03-30T17:36:13+00:00 app[web.1]: your server socket listen backlog is limited to 100 connections 2012-03-30T17:36:13+00:00 app[web.1]: *** Operational MODE: single process *** 2012-03-30T17:36:13+00:00 app[web.1]: WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x134c5d0 pid: 3 (default app) 2012-03-30T17:36:13+00:00 app[web.1]: *** uWSGI is running in multiple interpreter mode *** 2012-03-30T17:36:13+00:00 app[web.1]: spawned uWSGI worker 1 (and the only) (pid: 3, cores: 1) 2012-03-30T17:36:14+00:00 heroku[web.1]: Error R11 (Bad bind) -&gt; Process bound to port 43681, should be 3810 (see environment variable PORT) 2012-03-30T17:36:14+00:00 heroku[web.1]: Stopping process with SIGKILL 2012-03-30T17:36:15+00:00 heroku[web.1]: Process exited with status 137 2012-03-30T17:36:15+00:00 heroku[web.1]: State changed from starting to crashed </code></pre> <p>As you can see from the first line in the log, the correct port is being passed to uwsigi. Any thoughts on why this isn't working?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload