I have deployed my next js project in vercel it's showing 504: GATEWAY_TIMEOUT error on those pages where i have added getServerSideProps function. I am not calling any api request on this getServerSideProps.I am just using this function so that i can't get undefined query values when refreshing the page.
Error image is here: enter image description here
My code in which page this error is showing,
export async function getServerSideProps(context) {
return {
props: {},
};
}
Everything is working fine in localhost but when i deployed my project in vercel it's giving me this timeout error only on those pages where i have used this getServerSideProps. I had already checked after removing the getServerSideProps and after deploying it's wokring fine in vercel but i am getting undefined value of the queries. How can i solve this problem?
I am expecting not to get this error and also not gettiing undefined value of queries after refreshing.