Re: Creating my first test case, failing.

2024-03-26 Thread Filbert
bly reverse('courses-create') or > something like that. > > On Tue, 26 Mar 2024 at 18:55, Filbert wrote: > >> Consider this what seems to be a simple Django/DRF API which works: >> >> class CourseViewSet(viewsets.ModelViewSet): >> queryset = Cou

Creating my first test case, failing.

2024-03-26 Thread Filbert
Consider this what seems to be a simple Django/DRF API which works: class CourseViewSet(viewsets.ModelViewSet): queryset = Course.objects.all() serializer_class = CourseSerializer router = DefaultRouter() router.register(r'courses', CourseViewSet) urlpatterns = [ path('',

Re: Performance profiling Django Channels async consumers

2023-11-28 Thread Filbert
crickets...sigh... On Monday, November 27, 2023 at 11:29:37 AM UTC-5 Filbert wrote: > We are heavily using Django Channels async consumers and haven't found a > way instrument for performance profiling. > > We've tried NewRelic, but per their developers say they don't have support

Performance profiling Django Channels async consumers

2023-11-27 Thread Filbert
We are heavily using Django Channels async consumers and haven't found a way instrument for performance profiling. We've tried NewRelic, but per their developers say they don't have support for Django Channels. We run certain websocket connections through Gunicorn, Uvicorn, Channels-Async and

Re: Getting Django Channels working with NewRelic

2023-11-17 Thread Filbert
We use dramatiq not celery, instrumenting dramatiq was easy. Channels is a different beast, clearly a pattern NewRelic doesn't recognize out of the box. On Friday, November 17, 2023 at 12:40:38 PM UTC-5 Lutaaya Jamil wrote: > I have never used that, hearing for the first time though. > Is

Re: Hanging SyncConsumers taking down ASGI processing

2023-05-15 Thread Filbert
Kinda shocked no one responded to this. Sounds like most people aren't using SyncConsumers or aren't using Channels for mission critical applications. On Friday, April 28, 2023 at 8:42:17 AM UTC-4 Tim Nelson wrote: > I am chasing a database deadlock issue in my application. What appears to >

Re: Multi-tenant SSO that supports OpenID and MS Azure AD

2022-11-08 Thread Filbert
Thanks. By multiple IDPs, do you men multiple IDPs for multiple tenants? Since we are multi-tenant, some tenants will not have IDP providers, others may use social auths, and most will use their own IDP like LDAP/AD/Azure/etc. On Monday, November 7, 2022 at 2:49:18 PM UTC-5

Custom (delete) ProtectError message

2021-08-17 Thread Filbert
Prior to Django 3 we've managed to customize the delete message when you have (say) PROTECT set. It seems since Django 3, in deletion.py the collect() method eats our ProtectError exception and uses it's own. Is there a way to override this? -- You received this message because you are

RuntimeError: Lock is not acquired.

2021-05-15 Thread Filbert
I see this is likely something with channels_redis, is this an indicator of a bug or redis going offline (no indication it did) ?? On Friday, May 14, 2021 at 12:23:27 PM UTC-4 Filbert wrote: > And strangely I am seeing blocks of this in the log as well here and there > from Daphne. (

Re: Channels issue under load

2021-05-14 Thread Filbert
207.233.198:443 - - [14/May/2021:14:30:20] "WSCONNECTING /ws/" - - XX.207.233.198:443 - - [14/May/2021:14:30:20] "WSCONNECT /ws/" - - XX.207.233.198:443 - - [14/May/2021:14:30:21] "WSCONNECTING /ws/" - - XX.207.233.198:443 - - [14/May/2021:14:30:21]

Channels issue under load

2021-05-13 Thread Filbert
Multi-tenant Django application with 100's of WebSockets using Daphne/Channels. channels==2.4.0 channels-redis==2.4.2 daphne==2.5.0 Django==2.2.13 Only clue I have at this point is WebClients seem to hang up waiting for messages that are not delivered. I see in the Django logs "RuntimeError:

Re: Channels/Daphne offloading SSL Certs to AWS ELB fails to establish socket

2020-04-20 Thread Filbert
*Answering my own question.AWS classic ELBs never worked properly with websockets. Need to convert them to ALBs.* On Tuesday, April 14, 2020 at 5:37:54 PM UTC-4, Filbert wrote: > > Using AWS ELB, I was able to serve HTTP (via uwsgi) and websockets through > Nginx with Nginx handlin

Channels/Daphne offloading SSL Certs to AWS ELB fails to establish socket

2020-04-14 Thread Filbert
Using AWS ELB, I was able to serve HTTP (via uwsgi) and websockets through Nginx with Nginx handling the SSL certs. Once I tried to offloading SSL certs to the ELB so I could capture X-Forwarded-For, websockets fail to route/upgrade to Daphne and I get "Not Found: /ws/" in uwsgi's logs. Here

Re: Channels/Redis fault tolerance with Twemproxy?

2018-08-05 Thread Filbert
before you rely on it! > > Andrew > > On Thu, Aug 2, 2018 at 5:50 PM Filbert > > wrote: > >> Andrew, >> Just to be clear, there is no reason I can't use haproxy to front end >> redis sentinel to effectively hide all this from channels 1 or 2 right? >>

Re: Channels/Redis fault tolerance with Twemproxy?

2018-08-02 Thread Filbert
s > part of the greater Channels effort as HA solutions tend to be quite > workload-heavy to develop and test and end up being specific to certain > deployment scenarios. Contributions of code that could help are welcome, > though. > > Andrew > > On Wed, Aug 1, 2018 at 1:22 PM

Re: Channels/Redis fault tolerance with Twemproxy?

2018-08-01 Thread Filbert
Well in digging through posts I see Sentinel may be an option, does that mean if my CHANNEL_LAYER would have a single host entry? On Wednesday, August 1, 2018 at 9:42:39 AM UTC-4, Filbert wrote: > > Thanks Andrew, > So with a load-balanced ten web server implementation using

Re: Channels/Redis fault tolerance with Twemproxy?

2018-08-01 Thread Filbert
BLPOP properly still so I don't think > you can use it. > > Andrew > > On Sun, Jul 22, 2018 at 12:46 PM Filbert > > wrote: > >> And just to be clear as to my options, using Channels 2.0 I can use Redis >> cluster if I have to to get failover and fault toleranc

Re: Channels/Redis fault tolerance with Twemproxy?

2018-07-22 Thread Filbert
omment on it, but > if you don't care about data loss, it's probably fine? > > Andrew > > On Fri, Jul 20, 2018 at 3:30 PM Filbert > > wrote: > >> Going to have 10 or more EC2 instances running Channels 2.0. I really >> don't want to add the complexity of Redis Cluster or Redis

Channels/Redis fault tolerance with Twemproxy?

2018-07-20 Thread Filbert
Going to have 10 or more EC2 instances running Channels 2.0. I really don't want to add the complexity of Redis Cluster or Redis sentinel. Is a decent fault tolerant solution to implement Twemproxy, instead. I don't care about data loss if an instance crashes, but I do care that the

Is anyone using Channels 2 and asgi_rabbitmq?

2018-03-19 Thread Filbert
Making a major platform decision a ways out from product release. Running Channels 1.0 and Redis now, but we'd rather use RabbitMQ since our cluster is already provisioned with that for Celery, etc. I'd like to migrate to Channels 2.0 and asgi_rabbitmq, but I can't seem to find anyone that

Re: Channels: starting Daphne in production

2017-12-12 Thread Filbert
the connection before the handshake is completed and messages can be received.* *You must update Daphne to at least 1.0.0 to make this work correctly.* <http://channels.readthedocs.io/en/latest/releases/1.0.0.html#websocket-accept-reject-flow> On Tuesday, December 12, 2017 at 3:08:08 PM UTC-5, Filbert

Re: Channels: starting Daphne in production

2017-12-12 Thread Filbert
ec/2017:20:*06:43*] "WSDISCONNECT /ws/" - - On Tuesday, December 12, 2017 at 2:11:44 PM UTC-5, Filbert wrote: > > Also, curiously, when I use Inmemory, it seems to connect and immediately > disconnect. Hopefully my Nginx conf makes sense. > > location /ws { >

Re: Channels: starting Daphne in production

2017-12-12 Thread Filbert
"upgrade"; proxy_http_version 1.1; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; } On Tuesday, December 12, 2017 at 2:01:18 PM UTC-5, Filbert wrote: > > Yes, using rabbit... &g

Re: Channels: starting Daphne in production

2017-12-12 Thread Filbert
12, 2017 at 1:33:55 PM UTC-5, Andrew Godwin wrote: > > Hm, that looks to be like logging from asgi_rabbitmq - could you post your > settings configuration? And have you tried running with a different channel > layer? > > Andrew > > On Tue, Dec 12, 2017 at 10:14 AM, Filbert &l

Channels: starting Daphne in production

2017-12-12 Thread Filbert
Trying to come up with the proper command line to start Daphne in production. It seems when I start, it heads off into a repeated processing loop, my thought is that it should just be pending on a websocket connection. Using asgi_rabbitmq. daphne -u /opt/daphne.sock --ws-protocol

Re: django-channels - building JS websocket wrapper

2017-12-04 Thread Filbert
Duh, "npm run compile" Sorry. On Monday, December 4, 2017 at 6:47:25 PM UTC-5, Filbert wrote: > > Probably just my lack of client-side/JavaScript knowledge, but when I > build the library: > > git clone https://github.com/django/channels.git > > cd chann

django-channels - building JS websocket wrapper

2017-12-04 Thread Filbert
Probably just my lack of client-side/JavaScript knowledge, but when I build the library: git clone https://github.com/django/channels.git cd channels/js_client npm install browserify npm install Probably just my lack of client-side/JavaScript knowledge, but when I build the library

Re: Django Channels and multi-tenant will this be a world of hurt?

2017-11-27 Thread Filbert
can be faked like > host headers, so don't use it as the sole point of security). > > Is it not available via the headers list in the connect message? > > Andrew > > On Mon, Nov 27, 2017 at 2:58 PM, Filbert <tim...@gmail.com > > wrote: > >> Thanks agai

Re: Django Channels and multi-tenant will this be a world of hurt?

2017-11-27 Thread Filbert
daemon so I can't help you there I'm afraid. As > long as it does sensible process-management things it's probably alright? > > Andrew > > On Sat, Nov 25, 2017 at 5:17 PM, Filbert <tim...@gmail.com > > wrote: > >> Andrew, >> Thanks for the response. Se

Re: Django Channels and multi-tenant will this be a world of hurt?

2017-11-25 Thread Filbert
ork than you would merely doing the same for HTTP > requests. > > There are other non-Channels options around if you want to look into them, > but I suspect they'll all have similar architectural challenges. > > Andrew > > On Fri, Nov 24, 2017 at 3:09 PM, Filbert <ti

Django Channels and multi-tenant will this be a world of hurt?

2017-11-24 Thread Filbert
Running multi-tenant site using a fork of Django tenant schemas with tens of web servers and thousands of tenants Piloting a project to implement Channels for real-time notifications, etc. I want to confirm these assumptions: 1. Channels really has no support for multi-tenant, I will have