Code Monkey home page Code Monkey logo

Comments (4)

nethibernate avatar nethibernate commented on July 3, 2024

@laiwei @niean 谁来说明一下?看了代码,貌似没有找到数据库连接池里处理mysql wait_timeout的检测。

from graph.

laiwei avatar laiwei commented on July 3, 2024

稍等,我们来确认下

from graph.

niean avatar niean commented on July 3, 2024

@nethibernate

  1. broken pipe的错误,是由于mysql的server端wait_timeout后、连接不可用导致的。我们选用的mysql连接池有错误重试功能,虽然打印了错误日志,但数据最终可以正确写入到mysql
  2. graph已经修复了这个问题,不会再有这个错误日志,请注意查看最新代码commit
  3. 是否可以通过设置wait_timeout、来避免这个错误日志,正在尝试中,有结论了,会贴出

from graph.

niean avatar niean commented on July 3, 2024

可以通过设置server端的wait_timeout,来防止mysql连接broken pipe的错误。
修改方式为: 配置文件中db.dsn配置,添加一个参数"wait_timeout=604800"。一个例子,如下:
"dsn": "root:@tcp(1:3306)/graph2.0.0.172?loc=Local&parseTime=true&wait_timeout=604800",wait_timeout设置为7天。

from graph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.