【问题标题】:tomi:upload Meteor package 503 service unavailable errortomi:上传 Meteor 包 503 服务不可用错误
【发布时间】:2015-09-11 05:24:08
【问题描述】:

我在使用 Tomi:upload package: 的生产服务器上收到 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 已安装。 我觉得一头雾水。有人有建议吗?

/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;
}
});

【问题讨论】:

    标签: javascript node.js ubuntu meteor imagemagick


    【解决方案1】:

    所以我对此感到非常愚蠢..但我所需要的只是一个

    sudo apt-get install imagemagick
    

    我以为节点模块也能做到这一点,再猜一猜。

    【讨论】:

    • 你能澄清更多吗?我在如何使用此上传服务器调整图像大小时遇到​​问题
    • @Rasof 在这种情况下,我没有安装 imagemagick。我有一个节点模块,也称为 imagemagick,但我猜这并不是模块完成所有工作。因此,以这种方式安装 imagemagick 后,一切正常。
    猜你喜欢
    • 2013-07-18
    • 1970-01-01
    • 2021-01-07
    • 1970-01-01
    • 2017-01-14
    • 2017-02-26
    • 2015-12-10
    • 2021-06-16
    相关资源
    最近更新 更多