我在使用 Tomi:upload 包的生产服务器上收到 503 服务不可用错误:
Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
503 Service Unavailable @ 20.4 MB / sec
在本地我没有问题,所有代码都工作正常。现在我使用 MUP 将我的应用程序部署到带有 apache 的 ubuntu。
我也使用 mup 来记录错误:
/opt/dateanomad/.uploads//....E62FrDW7ifGkjieKC_bali.jpg
events.js:72
throw er; // Unhandled 'error' event
Error: spawn ENOENT
at errnoException (child_process.js:1011:11)
at Process.ChildProcess._handle.onexit (child_process.js:802:34)
error: Forever detected script exited with code: 8
error: Script restart attempt #16
>> stepping down to gid: meteoruser >> stepping down to uid: meteoruser
我给了/uploads 和/uploads/tmp dirs chmod 777 权限,只是......为了它。
getFilename 方法工作正常,但它没有写入不同的文件版本(imageVersions 方法)。 imagemagick 已安装。 我感觉毫 headless 绪。有人有建议吗?
/server/init.js
UploadServer.init({
tmpDir: process.env.PWD + '/.uploads/tmp',
uploadDir: process.env.PWD + '/.uploads/',
checkCreateDirectories: true,
maxPostSize: 2500000, //2.5MB
maxFileSize: 2500000, //2.5MB
imageVersions: {
bigPicture: {
width: 800,
height: 600
},
thumbnailBig: {
width: 300,
height: 300
},
thumbnailSmall: {
width: 150,
height: 150
}
},
getFileName: function(fileInfo, formData) {
// rename file with userid_filename
return formData.id +''+ fileInfo.name;
}
});
最佳答案
所以我对此感到非常愚蠢..但我所需要的只是一个
sudo apt-get install imagemagick
我认为 Node 模块也能做同样的事情,再猜一下。
关于javascript - 托米 :upload Meteor package 503 service unavailable error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31036204/