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
Molita
V2EX  ›  Python

[问题] Python -Eve 框架中不同端口上的服务对数据的写读不一致?

  •  
  •   Molita · 2018-03-12 11:57:11 +08:00 · 1069 次点击
    这是一个创建于 2237 天前的主题,其中的信息可能已经有所发展或是发生改变。

    问题描述:现在有两个服务分别运行在 a 和 b 端口上(在同一台服务器上,使用同一个数据库)。a 服务负责写数据,b 服务读数据,问题就出在 b 服务总是无法读取到 a 服务最新写入的数据(确认数据已经写入,并且查询语句也没有问题)。然后在重启 b 服务之后,就会拿到最新的数据。。。

    补充: 使用 gunicorn+gevent 启的服务,不过这个应该没有影响。我怀疑不同端口服务是否存在类似跨域保护的东西,或者是缓存?才导致这个问题,有没有大佬遇到过类似的问题,求解。

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1346 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 17:51 · PVG 01:51 · LAX 10:51 · JFK 13:51
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.