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

协程使用mysql连接池时报 #4176

Closed
staywithdream opened this issue Apr 26, 2021 · 0 comments
Closed

协程使用mysql连接池时报 #4176

staywithdream opened this issue Apr 26, 2021 · 0 comments

Comments

@staywithdream
Copy link

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? If possible, provide a simple script for reproducing the error.
    在使用协程进行PDO MySQL连接池操作的时候,前面执行了很多操作都没有问题,中间突然报错,说参数不正确和文件不存在

  2. What did you expect to see?
    成功执行

  3. What did you see instead?
    Uncaught Error: Wrong parameters for PDOException([string $message [, long $code [, Throwable $previous = NULL]]]) in @swoole-src/library/core/Database/PDOStatementProxy.php:70

  4. What version of Swoole are you using (show your php --ri swoole)?
    4.6.4

  5. What is your machine environment used (show your uname -a & php -v & gcc -v) ?
    20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64

PHP 7.4.16 (cli) (built: Apr 25 2021 08:59:39) ( NTS )

Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.0 (clang-1100.0.33.16)

错误输出:

PHP Fatal error:  Uncaught Error: Wrong parameters for PDOException([string $message [, long $code [, Throwable $previous = NULL]]]) in @swoole-src/library/core/Database/PDOStatementProxy.php:70
Stack trace:
#0 @swoole-src/library/core/Database/PDOStatementProxy.php(70): Exception->__construct(NULL, NULL)
#1 /Users/edison/code/php/swoole/app/Console/Commands/BinanceSimulationWithoutSaveBoll.php(758): Swoole\Database\PDOStatementProxy->__call('execute', Array)
#2 /Users/edison/code/php/swoole/app/Console/Commands/BinanceSimulationWithoutSaveBoll.php(275): App\Console\Commands\BinanceSimulationWithoutSaveBoll->_findGoodParams(Object(Swoole\Database\PDOProxy), 'DOGEUSDT', '15m', 'test', 1618329600, NULL, false)
#3 /Users/edison/code/php/swoole/app/Console/Commands/BinanceSimulationWithoutSaveBoll.php(256): App\Console\Commands\BinanceSimulationWithoutSaveBoll->_simulation(Object(Swoole\Database\PDOProxy), 'DOGEUSDT', '15m', 'test', 1618329600, NULL, false)
#4 {main}
  thrown in @swoole-src/library/core/Database/PDOStatementProxy.php on line 70

   Symfony\Component\Debug\Exception\FatalErrorException  : Uncaught Error: Wrong parameters for PDOException([string $message [, long $code [, Throwable $previous = NULL]]]) in @swoole-src/library/core/Database/PDOStatementProxy.php:70
Stack trace:
#0 @swoole-src/library/core/Database/PDOStatementProxy.php(70): Exception->__construct(NULL, NULL)
#1 /Users/edison/code/php/swoole/app/Console/Commands/BinanceSimulationWithoutSaveBoll.php(758): Swoole\Database\PDOStatementProxy->__call('execute', Array)
#2 /Users/edison/code/php/swoole/app/Console/Commands/BinanceSimulationWithoutSaveBoll.php(275): App\Console\Commands\BinanceSimulationWithoutSaveBoll->_findGoodParams(Object(Swoole\Database\PDOProxy), 'DOGEUSDT', '15m', 'test', 1618329600, NULL, false)
#3 /Users/edison/code/php/swoole/app/Console/Commands/BinanceSimulationWithoutSaveBoll.php(256): App\Console\Commands\BinanceSimulationWithoutSaveBoll->_simulation(Object(Swoole\Database\PDOProxy), 'DOGEUSDT', '15m', 'test', 1618329600, NULL, false)
#4 {main}
  thrown

  at @swoole-src/library/core/Database/PDOStatementProxy.php:70



   Whoops\Exception\ErrorException  : Uncaught Error: Wrong parameters for PDOException([string $message [, long $code [, Throwable $previous = NULL]]]) in @swoole-src/library/core/Database/PDOStatementProxy.php:70
Stack trace:
#0 @swoole-src/library/core/Database/PDOStatementProxy.php(70): Exception->__construct(NULL, NULL)
#1 /Users/edison/code/php/swoole/app/Console/Commands/BinanceSimulationWithoutSaveBoll.php(758): Swoole\Database\PDOStatementProxy->__call('execute', Array)
#2 /Users/edison/code/php/swoole/app/Console/Commands/BinanceSimulationWithoutSaveBoll.php(275): App\Console\Commands\BinanceSimulationWithoutSaveBoll->_findGoodParams(Object(Swoole\Database\PDOProxy), 'DOGEUSDT', '15m', 'test', 1618329600, NULL, false)
#3 /Users/edison/code/php/swoole/app/Console/Commands/BinanceSimulationWithoutSaveBoll.php(256): App\Console\Commands\BinanceSimulationWithoutSaveBoll->_simulation(Object(Swoole\Database\PDOProxy), 'DOGEUSDT', '15m', 'test', 1618329600, NULL, false)
#4 {main}
  thrown

  at @swoole-src/library/core/Database/PDOStatementProxy.php:70

   Whoops\Exception\ErrorException  : file_get_contents(@swoole-src/library/core/Database/PDOStatementProxy.php): failed to open stream: No such file or directory
twose added a commit to swoole/library that referenced this issue Apr 27, 2021
Not only error case would reach here, so, check it.
sy-records pushed a commit to swoole/library that referenced this issue May 19, 2021
Not only error case would reach here, so, check it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant