-
Notifications
You must be signed in to change notification settings - Fork 213
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
按照think-orm 接入的方式,接入了laravel ORM时,首次访问接口报错 #50
Comments
使用的mixphp版本是v1.1.1 , |
应该是没有正常连接吧,think-orm 是可以的,理论上 laravel ORM 只要配置正确应该也是可以的,但只能在同步编程中使用。 |
我配置的是同步的模式,错误只发生在第一次访问接口的时候,后续都是正常的,网上搜索了下说是 mysql 配置下连接timeout 的时间,我配置成了一小时,但是还是没用 |
感觉像是连接超时之后失效了,重新访问接口,就好了 |
那就应该是laravel orm 没有断线重连机制,think-orm 是有的 |
laravel 的 ORM是有断线重连的机制的,而断线MySQL会报 “MySQL server has gone away”的错误,但是现在报错的信息是 PDO::prepare(): send of 65 bytes failed with errno=32 Broken pipe |
断线的情况比你想想的要多的多,网关错误只是最常见的一种 https://github.com/mix-php/mix-database/blob/master/src/Persistent/PDOConnection.php#L113 |
解决不了的话,建议还是接入 think-orm 吧,那个我测试是通过的。 |
接入了laravel ORM时,报 PDO::prepare(): send of 65 bytes failed with errno=32 Broken pipe
The text was updated successfully, but these errors were encountered: