php sqlite3 busytime,SQLite3::busyTimeout

SQLite的busyTimeout方法和sqlite3_busy_timeout API是连接级别的属性,用于避免'数据库正忙'错误。设置非零超时值对于确保并发环境中的可靠性至关重要。必须在打开连接后设置,并且需要确认sqlite3库在编译时定义了HAVE_USLEEP,否则超时只能按秒计。不建议将超时设为零,以免影响查询、查询单条、准备或执行操作。
摘要由CSDN通过智能技术生成

[#2]

ppryor63 at gmail dot com [2014-02-13 13:30:50]

The busyTimeout() method and related API sqlite3_busy_timeout() is a connection level attribute and affects whole connection and should be set once after opening connection.  Do not set to zero or you will encounter "Database is busy" error message when calling query, querySingle, prepare, or execute methods.  Also ensure that sqlite3 library is compiled with HAVE_USLEEP defined, otherwise busyTimeout() can only time out in seconds.  It is very highly recommended to call busyTimeout() with non-zero timeout for reliability in concurrent environment.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值