Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7735389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:29:24+00:00 2026-06-01T07:29:24+00:00

I’m trying to deploy Django to Heroku (cedar stack) with uwsgi as my app

  • 0

I’m trying to deploy Django to Heroku (cedar stack) with uwsgi as my app server.

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.

Procfile

web: uwsgi --http :$PORT --home $HOME --ini conf/uwsgi.ini

conf/uwsgi.ini

(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.)

env = DJANGO_SETTINGS_MODULE=retargeting.settings
module = django.core.handlers.wsgi:WSGIHandler()

Here is the output from my heroku logs:

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) -> 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

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T07:29:26+00:00Added an answer on June 1, 2026 at 7:29 am

    do not use –http on heroku. Use –http-socket.

    The first one is a proxy solution, binding on two different ports.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.