-
Notifications
You must be signed in to change notification settings - Fork 126
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
nginx负载均衡采用了iphash,会一直报写文件失败 #97
Comments
请确保均衡负载后上传时的多个请求访问的是同一台服务器,看下其他服务器相应目录是否有文件生成?正常是不应该有文件生成的。如果不能确保访问同一台,那需要想办法所有服务器都使用同一个储存目录。 |
服务器是linux系统、且多台服务器在同一个局域网的话,可以使用nfs将某台设备的某个目录挂载(mount)到其他多个设备上,这样多台服务器用的就是同一个磁盘目录了。 |
用了软连接之后,php artisan aetherupload:clean会报错,Links are not supported, encountered link at /home/wwwroot/xgzx.admin.talkmed.com/storage/app/public/aetherupload/file/subdir,我自己写了一个删除的方法 |
软连接的问题应该不大,能解决就好。iphash的方案感觉还是有局限性,其上传的文件是分散在多个服务器里的,比如你传一张图片到服务器A,自己是肯定能访问到的,但别人就不一定了,可能他访问到的服务器是B,就无法获取你传的图片。 |
No description provided.
The text was updated successfully, but these errors were encountered: