-
Notifications
You must be signed in to change notification settings - Fork 116
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
Time out issue #87
Comments
to be clear are you getting timeout on function call or during the build? ive never seen this kind of timeout but im new here also check https://github.com/stubailo/apollo-netlify-lambda-app for working example |
On function call. Build doesn't report any errors. Thanks for the link, I've gotten other similar lambda projects working on Netlify though. |
its likely something wrong in the function code then. are you calling the callback? or returning a promise? sorry i know it sounds dumb but pple miss this stuff sometimes |
to be clear tho, i do regard this difference between local emulation and real deploy a bug. if we’re letting you run something we shouldn’t, we should try to fix that. however i need to know how to repro |
Sorry for not having provided more info on this, I'm unfortunately way too busy at the moment. Closing this for now. |
still appreciate the report. we shouldnt let you locally do stuff you cant do in the prod enviroment. at the same time i wish our functions lived longer than 5 mins. good luck |
@sw-yx can we reopen this issue? My function works perfectly locally but times out in prod. How do we debug these issues. 1.Here's my function.
Everything else is identical to what is in create-react-app-lambda repo, with the exception of different file names. I cannot think of any other information that would be pertinent. Any help you could provide would be great! Thanks beforehand. |
just to be sure - DEV__DB__URL is a remote mongo server right? cos you're not running a mongodb server in our functions. what you can do is show your deploy and/or function logs. if your site is open source, you can link it like this: https://app.netlify.com/sites/jamstack-hackathon-starter/deploys and you can look specficlly at your function logs https://app.netlify.com/sites/jamstack-hackathon-starter/functions/hello if you need further support on Netlify Functions, i recommend contacting https://netlify.com/support |
@sw-yx Thank you for the quick response! Yes
Here is a link to latest deploy logs click here. The function logs only have the following:
|
ok it looks like you're doing things right so far. please contact Netlify Support to figure out why your function is timing out. e.g. make sure basic stuff like auth isnt blocking you and env vars are set up correctly for Netlify Functions. comment out code, console.log and figure which exact line of code is causing you to time out. |
@sw-yx Thanks for your help! |
@JNaeemGitonga Whats the status for your issue? I'm gettings the same error message, ist works fine locally, but I get the Timeout message when I deploy to netlify. Was the support able to help you out? Thanks in advance |
@JiiB No, unfortunately there wasn't much in the forum that helped me. What did help though was for me to deploy the function to AWS so that I could get better logging and see the results of my changes quicker. For example, just yesterday I was at a hackathon and my team decided to go with my suggestion of using create-react-app-lambda to bootstrap our project. Well, the same thing happened again after modifying the function with our own code; it worked locally but not in prod. I took the function and deployed it using my personal AWS account and was able to get it running there and then updated my code in our netlify + lambda app. My error was that something in my function wasn't resolving or closing causing the function to timeout. Check around the Hope this helps! |
@JNaeemGitonga Thanks for your info. I'll try to deploy my function to AWS directly. I use my function to send an email with an attachment. I used my Gmail Account with OAuth2 and everything worked fine (also when I deployed to Netlify). Today I switched to an SMTP email account instead, It works locally, I'm getting the correct status codes that I've definded. When I deploy to Netlify, the email will still be sent correctly, but i don't receive my configured status codes, instead I get the timeout message. Hopefully it will work with AWS |
if y'all need help in future always keep in mind our support team at https://www.netlify.com/support/ also we have a related PR for this that will help replicate the timeout locally #116 |
Hey, I was having the same issue and I was wondering, for the SMTP you switched to, where you putting in the password straight in ‘auth.pass’ or did you do some OAuth2 like you did for google. I think that might be the problem. I tried for google and it worked locally but didn’t in netlify, and the same thing happened with the new SMTP I tried, and I never used OAuth2 for neither |
I don't run into any issues with my built function locally. It runs immediately.
But when deployed on Netlify, I'm getting a time out error:
Any clues what could be wrong? Or else - how do I debug this?
Information:
The text was updated successfully, but these errors were encountered: