Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

压力测试数据库连接查询抛出警告 #97

Closed
eaglering opened this issue Feb 1, 2018 · 1 comment
Closed

压力测试数据库连接查询抛出警告 #97

eaglering opened this issue Feb 1, 2018 · 1 comment

Comments

@eaglering
Copy link

运行代码:

$result1 = Mobiles::query()->select('*')->where('mobile', '1571155')->limit(1)->getDefer();
$result = $this->redis->set('test1', 1);
var_dump($result);
var_dump($result1->getResult());

执行测试:
ab -n 10 -c 10 http://192.168.1.199:8098/mok/test

抛出警告:
PHP Warning: Swoole\Coroutine\MySQL::query(): mysql client has already been bound to another coroutine. in /dir/project/vendor/swoft/framework/src/Db/Mysql/MysqlConnect.php on line 55

@stelin
Copy link
Member

stelin commented Mar 14, 2018

已解决,更新版本,要求最新swoole版本

@stelin stelin closed this as completed Mar 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants