Comments (7)
Memory usage of a worker is mostly dominated by Django and the app itself, though 500MB is quite a lot. Some questions:
- What version of Channels, Daphne, Django and Python are you using?
- Does the same thing happen with a normal WSGI process with, say, gunicorn with similar code?
- What sort of throughput are the workers getting?
- What channel layer are you using?
from daphne.
- What version of Channels, Daphne, Django and Python are you using?
channels==0.14.0
daphne==0.12.1
Django==1.9.5
Python : 2.7.1 - Does the same thing happen with a normal WSGI process with, say, gunicorn with similar code?
Couldn't say for sure. I will try to reproduce the same load with gunicorn and will let you know - What sort of throughput are the workers getting?
throughput was around 200request per minute but I can assure you it was not that much. - What channel layer are you using?
Redis.
from daphne.
You're on old versions of channels and daphne; I'd at least try upgrading them first as some memory leaks were fixed a while ago.
from daphne.
from daphne.
I agree the footprint is too high, I want to make sure we can isolate it to the most recent release of channels and that it's not there when you run Django in normal WSGI mode, otherwise it's not a problem I can solve!
from daphne.
Closing due to lack of response.
from daphne.
Deploying Python Applications with Gunicorn fix this problem for me-
pip install gunicorn
pip freeze requirements.txt
Or, you can manually add it to your requirements.txt file.
Next, revise your application’s Procfile to use Gunicorn. Here’s an example Procfile
from daphne.
Related Issues (20)
- runworker does not adhere to logging configuration from settings.py HOT 2
- Twisted exception when TLS is used with Daphne on Windows 10 HOT 11
- 3.0.2 Failing Safety Check - No Stable Upgrade Available HOT 3
- Django running behind multiple Daphne instances opens too many database connections HOT 11
- Error setting up SSL - CRITICAL Listen failure: Couldn't listen on any:8000: [Errno 98] Address already in use. HOT 1
- Response 400 when submit a 3-Images Form by POST HOT 2
- Missing support for --nostatic and --insecure options in Daphne's runserver command HOT 2
- how to set websocket send buffersize in daphne
- issuse when i using daphe in my django app with streaminghttpresponse HOT 7
- Can daphne run WSGI apps? HOT 6
- Does daphne have a file for initialization?
- Requests with Transfer-Encoding: chunked have no content HOT 14
- StreamHttpResponse with sync operations break in Daphne HOT 5
- Memory usage: Daphne loading all the file in memory (POST request) HOT 7
- Text streaming buffered issue
- Implement WebSocket Denial Response extension HOT 8
- [feature request] trailing headers HOT 1
- Add support for Python 3.12
- DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13 HOT 1
- Daphne with self signed ssl HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from daphne.