Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
408 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 Reply

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...