[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[Help](/c/help/9)

# Unable to get data from server

147 views · 1 like · 4 posts


Rakeshdevarakonda (@rakeshdevarakonda) · 2024-08-27

https://real-time-chat-application-api-two.vercel.app/  

i have developed api for my project and deployed in vercel everything is ok but unable to retrieve data from server  (MongoDB)
 
github 

https://github.com/RakeshDevarakonda/Real-Time-Chat-Application-API


if I do same in render hostig service it works perfectly but not in vercel


like if goto https://real-time-chat-application-api-two.vercel.app/  

i have developed api for my project and deployed in vercel everything is ok but unable to retrieve data from server  (MongoDB)
 
github 

https://github.com/RakeshDevarakonda/Real-Time-Chat-Application-API


if I do same in render hostig service it works perfectly but not in vercel  


if I goto https://real-time-chat-application-api-two.vercel.app/  

i have developed api for my project and deployed in vercel everything is ok but unable to retrieve data from server  (MongoDB)
 
github 

https://github.com/RakeshDevarakonda/Real-Time-Chat-Application-API


[if I do same in render hostig service it works perfectly but not in vercel  

if gotopostman  API  https://real-time-chat-application-api-two.vercel.app/api/register   enter details username email password confirmpassword shows  An error occurred with your deployment

FUNCTION_INVOCATION_TIMEOUT


Swarnava Sengupta (@swarnava) · 2024-08-27

It looks like you are trying to Run a [Server](https://github.com/RakeshDevarakonda/Real-Time-Chat-Application-API/blob/main/index.js#L97-L101) in Vercel platform and also relying on Websocket. Please note that Vercel is a Serverless platform and you cannot run Websocket in Vercel platform.


Rakeshdevarakonda (@rakeshdevarakonda) · 2024-08-27

Thanks for the help, but I’m having trouble retrieving data from MongoDB for my API. Can you help me understand why I'm not able to get the data?   i have removed socket also

API       POST REQUEST

https://real-time-chat-application-api-two.vercel.app/api/login

 {
"email":"rakeshdevarakonda2000@gmail.com",
"password":"string"
}


response-  sigin successfully with jwt token

can you help with this error is  An error occurred with your deployment

FUNCTION_INVOCATION_TIMEOUT


Swarnava Sengupta (@swarnava) · 2024-08-27 · ♥ 1

Could you try the troubleshooting steps we have documented in our docs?

https://vercel.com/docs/errors/FUNCTION_INVOCATION_TIMEOUT