Back

Functions exceeding timeout

  • 0
  • Self Hosted
  • Functions
  • REST API
fafa
18 Jan, 2024, 16:31

Heyo,

When sending the same POST multiple times, it seems to be giving a 30 second timeout for no reason at all. Is there some sort of "stop spamming my function" kind of thing? I posted twice and it succeeded, then it just gives a 30s timeout. Internal error: Operation timed out after 30000 milliseconds with 0 bytes received

If it's rate limiting from appwrite, why wait 30 seconds? Why not send a message back?

TypeScript
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <meta name="description" content />
    <link rel="icon" href="/favicon.png" />
    <link rel="preload" href="/fonts/inter/inter-v8-latin-600.woff2" as="font" type="font/woff2" crossorigin />
    <link rel="preload" href="/fonts/inter/inter-v8-latin-regular.woff2" as="font" type="font/woff2" crossorigin />
    <link rel="preload" href="/fonts/poppins/poppins-v19-latin-500.woff2" as="font" type="font/woff2" crossorigin />
    <link rel="preload" href="/fonts/poppins/poppins-v19-latin-600.woff2" as="font" type="font/woff2" crossorigin />
    <link rel="preload" href="/fonts/poppins/poppins-v19-latin-700.woff2" as="font" type="font/woff2" crossorigin />
    <link rel="preload" href="/fonts/source-code-pro/source-code-pro-v20-latin-regular.woff2" as="font"
        type="font/woff2" crossorigin />
    <link rel="stylesheet" href="https://unpkg.com/@appwrite.io/pink" />
    <link rel="preload" as="style" type="text/css" href="/fonts/main.css" />
    <link rel="stylesheet" href="/fonts/main.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta http-equiv="content-security-policy" content>
    <title>DB-Web - Error</title>
    <style>
        @media(min-width:768px) {
            article.card {
                padding: 2rem !important;
            }
        }
    </style>
</head>

<body>
    <div class="container u-margin-block-start-24">
        <article class="card u-padding-16">
            <div class="u-flex u-flex-vertical u-gap-16">
                <h1 class="heading-level-4 u-trim-1">Error 400</h1>
                <p class="text">Internal error: Operation timed out after 30001 milliseconds with 0 bytes received</p>
                <div class="u-flex u-flex-vertical u-gap-8">
                    <p class="text">Type</p>
                    <p><code class="inline-code">general_argument_invalid</code></p>
                </div>
            </div>
        </article>
    </div>
    <script type="4e70c5ab191f7153a5403187-text/javascript">
        const app = (JSON.parse(localStorage.getItem('appwrite')) ?? {}); const theme = app.theme ?? 'auto'; if (theme === 'auto') { const darkThemeMq = window.matchMedia('(prefers-color-scheme: dark)'); if (darkThemeMq.matches) { document.body.setAttribute('class', `theme-dark`); } else { document.body.setAttribute('class', `theme-light`); } } else { document.body.setAttribute('class', `theme-${theme}`); } 
    </script>
    <script src="/cdn-cgi/scripts/7d0fa10a/cloudflare-static/rocket-loader.min.js"
        data-cf-settings="4e70c5ab191f7153a5403187-|49" defer></script>
    <script defer
        src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317"
        integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA=="
        data-cf-beacon='{"rayId":"84782c991c7c717b","r":1,"version":"2024.1.0","token":"e5b6f6c87f9c4a98a41ab4a6e1a69af9"}'
        crossorigin="anonymous"></script>
</body>

</html>
TL;DR
Developers are experiencing a 30 second timeout error when sending multiple POST requests. They suspect it may be due to rate limiting from appwrite. They suggest that if it is rate limiting, a message should be sent back instead of waiting for 30 seconds. The error message received is `Internal error: Operation timed out after 30000 milliseconds with 0 bytes received`. Solution: It is suggested to check the rate limiting settings in appwrite and adjust them accordingly. If rate limiting is not the issue, further investigation into the server configurations is recommended.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more