V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  tmackan  ›  全部回复第 6 页 / 共 7 页
回复总数  138
1  2  3  4  5  6  7  
2016-08-29 12:57:58 +08:00
回复了 tmackan 创建的主题 Python curl 无法连接到主机
@julyclyde 不好意思,你从哪里看出是 gunicorn 选项设置错误
2016-08-29 12:00:02 +08:00
回复了 pc10201 创建的主题 Python 关于 django 项目布局
@nooper 那搞不懂你要什么了。
2016-08-29 10:51:57 +08:00
回复了 pc10201 创建的主题 Python 关于 django 项目布局
@nooper
相当于是最佳实践吧
比如每个 app 的 templates 都单独放在 app 下面。类似这种。
2016-08-28 21:41:27 +08:00
回复了 tmackan 创建的主题 Python curl 无法连接到主机
@laoyur 感谢,因为我 settings 配置下面 ALLOWED_HOSTS 设置错了,所以 supervisor 起不来,现在好了= =
2016-08-28 19:27:54 +08:00
回复了 tmackan 创建的主题 Python curl 无法连接到主机
@coolloves 咳,现在 supervisor 一直起不来了= =
2016-08-28 18:15:54 +08:00
回复了 tmackan 创建的主题 Python curl 无法连接到主机
@laoyur 你好,我本意是要 nginx 的。那该如何做啊?
2016-08-28 12:52:45 +08:00
回复了 tmackan 创建的主题 Python curl 无法连接到主机
ok 解决了,我的 unicorn 绑定的地址,应该填写为外网
2016-08-28 12:17:40 +08:00
回复了 pythlo 创建的主题 Python python 问题
发帖的时候,可以用 markdown 语法
```
你的代码
```
会有一个 pre 的效果
2016-08-26 15:18:17 +08:00
回复了 tmackan 创建的主题 Python 测试 uwsgi 报错
@wang9571
ok ,明白了,那应该是版本问题
2016-08-26 14:22:43 +08:00
回复了 tmackan 创建的主题 Python 测试 uwsgi 报错
@wang9571
嗯 但是有的教程中
不用指明 hello world 字符串转为 bytes 型也行
咳 也是醉了 我快被部署折腾疯了
2016-08-26 14:08:53 +08:00
回复了 tmackan 创建的主题 Python uwsgi+nginx 配置,然后浏览器报错 ERR_EMPTY_RESPONSE
有时候提示:
uwsgi_proto_uwsgi_parser(): Resource temporarily unavailable [proto/uwsgi.c line 40]
= =资源暂时不可用
2016-08-26 13:41:23 +08:00
回复了 tmackan 创建的主题 Python 测试 uwsgi 报错
@wang9571
又出现另一个问题,麻烦看下
http://www.v2ex.com/t/301307#reply2
感谢
2016-08-26 13:14:36 +08:00
回复了 tmackan 创建的主题 NGINX nginx Failed to read PID from file /run/nginx.pid: Invalid argument
@lhbc 哥们你好,还得麻烦你有遇到这个问题吗?
http://www.v2ex.com/t/301307#reply2
感谢
2016-08-26 11:36:51 +08:00
回复了 tmackan 创建的主题 Python uwsgi+nginx 配置,然后浏览器报错 ERR_EMPTY_RESPONSE
uwsgi_proto_uwsgi_parser(): Inappropriate ioctl for device [proto/uwsgi.c line 40]

目前报这个错误
不支持的设备驱动?
2016-08-24 10:48:22 +08:00
回复了 tmackan 创建的主题 Python uwsgi+nginx 配置,然后浏览器报错 ERR_EMPTY_RESPONSE
uwsgi.log 的日志:


*** Starting uWSGI 2.0.13.1 (64bit) on [Wed Aug 24 10:42:59 2016] ***
compiled with version: 4.8.5 20150623 (Red Hat 4.8.5-4) on 19 August 2016 14:24:34
os: Linux-3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015
nodename: iZ230ph83b2Z
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 1
current working directory: /alidata/websites/LandsBLog
detected binary path: /root/.virtualenvs/blog/bin/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
chdir() to /alidata/websites/LandsBLog/LandsBlog
your processes number limit is 7283
your memory page size is 4096 bytes
detected max file descriptor number: 65535
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address :8077 fd 3
Python version: 3.4.1 (default, Aug 19 2016, 10:38:55) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]
Set PythonHome to /root/.virtualenvs/blog
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x1b28a90
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 507200 bytes (495 KB) for 4 cores
*** Operational MODE: preforking ***
WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x1b28a90 pid: 3998 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 3998)
spawned uWSGI worker 1 (pid: 4000, cores: 1)
spawned uWSGI worker 2 (pid: 4001, cores: 1)
spawned uWSGI worker 3 (pid: 4002, cores: 1)
spawned uWSGI worker 4 (pid: 4003, cores: 1)
[pid: 4003|app: 0|req: 1/1] 140.205.145.230 () {30 vars in 392 bytes} [Wed Aug 24 10:43:50 2016] GET /check?ip=120.27.202.78_80 => generated 3823 bytes in 35 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 0)


显示已经接受到了请求,并且生成了 bytes 数据啊,但是浏览器还是访问不到。
2016-08-23 21:23:53 +08:00
回复了 tmackan 创建的主题 Python 测试 uwsgi 报错
@wang9571 非常感谢,此为正解
2016-08-23 18:36:45 +08:00
回复了 tmackan 创建的主题 Python 测试 uwsgi 报错
@csdreamdong
我是在已经开启了虚拟环境的情况下,运行 uwsgi --http :8001 --wsgi-file /alidata/websites/LandsBLog/test.py&命令的
日志也显示, uwsgi 和 python 都是虚拟环境中所对应的,而不是 system-side 的。
2016-08-23 16:03:57 +08:00
回复了 tmackan 创建的主题 Python 测试 uwsgi 报错
@bdbai 试了 不行呀
2016-08-23 15:19:29 +08:00
回复了 tmackan 创建的主题 Python 测试 uwsgi 报错
@lovepython
python 中字符串本身就是可以迭代的
1  2  3  4  5  6  7  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2290 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 19ms · UTC 06:08 · PVG 14:08 · LAX 23:08 · JFK 02:08
Developed with CodeLauncher
♥ Do have faith in what you're doing.