V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
spark
V2EX  ›  Python

Django本地开发服务器奇慢是什么问题?

  •  
  •   spark · 2011-12-22 16:07:14 +08:00 · 6087 次点击
    这是一个创建于 4535 天前的主题,其中的信息可能已经有所发展或是发生改变。
    什么都没有,全新开启一个项目:

    django-admin.py startproject test
    cd test
    python manage.py runserver

    之后在浏览器里要开30秒以上才能打开...

    Google到的解答基本是把/etc/hosts中 "::1 localhost" 注释掉,但对我无解。

    有问题的机器是Mac Pro,在mbp上反而跑的飞快,一点问题没有。

    同样我在这台机器开虚拟机的Ubuntu搭环境,也是跑的飞快,实在搞不懂。
    2 条回复    1970-01-01 08:00:00 +08:00
    est
        1
    est  
       2011-12-22 16:16:05 +08:00
    strace之
    spark
        2
    spark  
    OP
       2012-07-16 09:42:48 +08:00
    在用Flask时也有同样的问题,终于在今天找到解决方案了。

    原因是我在Mac Pro没有设置DNS,而MBP是有的,然后我把前者设置了一个联通的DNS,问题迎刃而解。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2293 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 15:38 · PVG 23:38 · LAX 08:38 · JFK 11:38
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.