What location is your MongoDB instance located in? Maybe you can read this guide and debug a bit:
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Fetching mongoDB data with lambda functions | 6 | 7026 | August 10, 2020 | |
| Netlify lambda & MongoDB time out | 2 | 3207 | August 2, 2020 | |
| Increase function timeout from 10s to max of 26s | 5 | 180 | October 6, 2021 | |
| Function returns 502 Gateway Error | 7 | 86 | June 23, 2025 | |
| My netlify function timeout in production but not in local environment | 27 | 2741 | July 25, 2023 |