MySQL&django hangs on huge session delete
I am not MySQL expert, but I guess MySQL locks the table for the deleting and this might be MySQL transaction/backend related. When deleting is in progress MySQL blocks the access to the table from other connections. MyISAM and InnoDB backend behavior might differ. I suggest you study MySQL manual related to this: the problem is not limited to Django domain, but generally how to delete MySQL rows without blocking access to the table. 
For the future reference I suggest you set-up a session cleaner task which will clear the sessions, let's say once in a day, from cron so that you don't end up with such huge table.
I'm running django site with MySQL as DB back-end.
Finally i've got 3 millions rows in django_session table. Most of them are expired, thus i want to remove them.
But if i manually run  delete from django_session where expire_date < "2011-04-18" whole site seems to be hanged - it cannot be accessed via browser.
Why such kind of blocking is possible? How to avoid it?