Fix server unexpected quit problem when using django