Skip to content
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

部署 vercel 后报错,但本地调试生成并上传R2都正常。 #1

Open
boyso opened this issue Jul 31, 2024 · 1 comment
Open

Comments

@boyso
Copy link

boyso commented Jul 31, 2024

本地生成图像功能都跑通了,但部署到Vercel后生成就会报错,如下,不知有没有遇到过:
企业微信截图_20240731160051

`
报错内容
69-9b793a7f9f24acef.js:1 Failed to generate image:
Error:

<title>aianimegenerator.app | 504: Gateway time-out</title>

Gateway time-out Error code 504

Visit cloudflare.com for more information.
2024-07-31 08:00:09 UTC
<span class="cf-icon-browser block md:hidden h-20 bg-center bg-no-repeat"></span>
<span class="cf-icon-ok w-12 h-12 absolute left-1/2 md:left-auto md:right-0 md:top-0 -ml-6 -bottom-4"></span>
You

Browser

Working
Singapore

Cloudflare

Working
<span class="cf-icon-server block md:hidden h-20 bg-center bg-no-repeat"></span>
<span class="cf-icon-error w-12 h-12 absolute left-1/2 md:left-auto md:right-0 md:top-0 -ml-6 -bottom-4"></span>
aianimegenerator.app

Host

Error
            </div>
        </div>
    </div>

    <div class="w-240 lg:w-full mx-auto mb-8 lg:px-8">
        <div class="clearfix">
            <div class="w-1/2 md:w-full float-left pr-6 md:pb-10 md:pr-0 leading-relaxed">
                <h2 class="text-3xl font-normal leading-1.3 mb-4">What happened?</h2>
                <p>The web server reported a gateway time-out error.</p>
            </div>
            <div class="w-1/2 md:w-full float-left leading-relaxed">
                <h2 class="text-3xl font-normal leading-1.3 mb-4">What can I do?</h2>
                <p class="mb-6">Please try again in a few minutes.</p>
            </div>
        </div>
    </div>

    <div class="cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t border-gray-300">

Cloudflare Ray ID: 8abc0d589b7b6005 Your IP: Click to reveal 185.217.5.27 Performance & security by Cloudflare

<script>(function(){function d(){var b=a.getElementById("cf-footer-item-ip"),c=a.getElementById("cf-footer-ip-reveal");b&&"classList"in b&&(b.classList.remove("hidden"),c.addEventListener("click",function(){c.classList.add("hidden");a.getElementById("cf-footer-ip").classList.remove("hidden")}))}var a=document;document.addEventListener&&a.addEventListener("DOMContentLoaded",d)})();</script>
</div>
`
@enterwiz
Copy link
Owner

Vercel Hobby Plan默认超时时间是10s,目前调用Replicate生图API采用的是同步模式,一般耗时在20s左右。可尝试调大timeout参数。

https://vercel.com/docs/functions/configuring-functions/duration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants