I m building a project for treehacks and
I'm building a project for treehacks and this is one of the main things I need to bring my project to completion 🥺
26 Replies
@OccultSlolem, did you get this working? our action timeout should already be 2m, lmk what errors you're hitting.
It's timing out around 30s for me. I used the code for free business plan.
It's a little inconsistent; sometimes it's like 21 seconds, sometimes its 36, it bounces a little
The function is an HTTP endpoint
ahh okay, yeah the HTTP endpoints have a shorter timeout (for now at least). let me see what we can do to unblock you.
Thanks. The email on the account is me@ethan-hanlon.xyz
and the setup here is that you have an endpoint that calls an action that performs the API call?
Yep
endpoint -> action -> OpenAI API and back again
would it be possible to structure your app to directly call the action? (rather than going through the endpoint)
The environment that my app is running in needs a URL to send the request to
Unless there's a secret URL hidden in the actions
yeah, I think we can get that with our (soon to be public!) API. give me a second.
👀
okay, so if you have your instance URL (can get it from "Settings" on the dashboard for your deployment, one of mine looks like "https://lonely-parrot-58.convex.cloud"), you can do...
would that work?
Thing is that the environment I'm working in isn't even a full fledged JS thing where I can make those kinds of calls. It's more like a reeeally simplified HTML form-like JSON programming almost language thing. Here's the box where my input would go in
And when the submit button is pressed it forwards it to whatever is in the api. I can't do a lot of code-y stuff in here unfortunately.
It's a thing called you.com (you can see an example at https://editor.you.com)
ah okay, makes sense! k I'll look into bumping up the timeout on our side.
one hacky idea we can try in parallel is setting up a tiny HTTP server (node, deno, etc. should work) that you.com can call into. then, the handler on that HTTP server would do that logic for calling into convex's API internally.
a vercel API function should work for that too
Yeah I was actually looking into that. I even set up a docker image and pushed it to a gcloud VM
only thing is I forgot how to set up all the permissions so that external users can call that 😅
ya actually if you're already using netlify or vercel for your project, it should be super easy to set that up there
https://vercel.com/docs/concepts/functions/serverless-functions/quickstart
another idea is if you want to just run it locally, ngrok (https://ngrok.com/) can help for getting an internet accessible URL
ngrok - Online in One Line
ngrok is the fastest way to put anything on
the internet with a single command.
could work for the hackathon maybe, i'll give it a shot
If you could bump up the limit that would defo be appreciated
yep, on it 🙂
(might need to push a new version of our server since it's not currently configurable but should be pretty easy. i'll likely just push an updated version for your prod and dev deployments.)
Sounds cool. The code that's currently in those functions seems to work well when it doesn't go over the timeout.
@OccultSlolem, merging the PR now and will do a deploy on our side, eta around 30m. can you send me the deployment URLs for your dev and prod deployments for your project?
having some CI issues on our side for getting a release out, working on it!
No worries! Was just about to ask.
okay! the timeout should be 2m now. @OccultSlolem, can you see if it works now?
👏 @sujayakar
I can confirm that the timeout is no longer an issue. Thank you all very much!
Hey, just wondering did you guys revert the updated timeout? I'm getting 408 errors on my endpoint again and I can't think of any other cause. I'd really like to not have to remake everything in Firebase soz