Django, apache, mod_wsgi - Error: Premature end of script headers

前端 未结 6 1658
时光取名叫无心
时光取名叫无心 2021-02-13 21:24

Apache logs in mode debug:

[Tue Dec 21 11:36:33 2010] [info] [client 1.53.149.114] mod_wsgi (pid=24831, process=\'mysite\', application=\'mysite.com|\'): Loading         


        
6条回答
  •  Happy的楠姐
    2021-02-13 22:09

    I am getting this same error, and while the underlying cause may be the multiple python versions, I have found that it is happening because of hung queries from Django to my MySQL server. If I run a

    show processlist;
    

    at the MySQL prompt, I see that queries are backing up in the queue. If I kill the query at the top, all other open processes immediately complete and my site comes back to life.

    Hope this helps someone else. You can also run

    show full processlist;
    

    to see the exact query. In my case, it was a django select_related query that created tons of INNER JOIN clauses in the query.

    See: http://dev.mysql.com/doc/refman/5.1/en/show-processlist.html

提交回复
热议问题