Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
427 views
in Technique[技术] by (71.8m points)

swoft引入laravel数据库操作包的问题

我将原来在laravel的接口迁徙到了swoft框架里 因为接口中数据库操作有with这样的laravel数据库操作方法 所以在swoft中使用composer加载了IlluminateDatabase
然后这样在swoft框架中使用laravel框架的数据库操作方法
但可能是配置问题或者因为swoft是常驻内存的运行方式
在并发100左右(不一定多大并发下触发)报如下错误 AppExceptionHandlerHttpExceptionHandler:handle(40) SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.
按照错误提示给的pdo设置,以及从网上看到的一些pdo设置,都未能解决。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...