2013/4/17 Daniel Swarbrick <[email protected]> > On the pure Django side of things, one of the challenges I encountered was > "IDLE IN TRANSACTION" hanging DB connections in the long-running WebSocket > views. I really ought to research a more elegant solution to this, but for > now I'm just doing all my DB queries early in the view, then fairly > brutally closing the DB connection before entering the long-running WS poll > loop. >
The new transaction management introduced in Django 1.6 may help with this problem, but it isn't a good idea not to maintain one database connection per websocket on a website with more than a few users anyway :) I believe you need a connection pooler and asynchronous database I/O if you want to talk to the database from a websocket handler. I haven't looked at this in detail. Is there any possibility that Tulip could be backported to Python 2.7, or > are we kinda past caring about 2.x? > No, it cannot be backported to Python 3.2 or earlier because it requires the "yield from" syntax introduced in Python 3.3. -- Aymeric. -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
