Next function calling bug after few refreshes
Answered
Giant Angora posted this in #help-forum
Giant AngoraOP
I have an interval in my page and when i start dev server , it successfully works , after 2 or 3 page refreshs , it getting work , but when i refresh after that , there's no way that function call than restarting dev server
54 Replies
Giant AngoraOP
@Anay-208 | Ping in replies
@Anay-208 | Ping in replies Can you send your code?
Giant AngoraOP
Sorry its too much
How can i send it?
Use codeblocks and send relevant parts
Or use gist
Its an interval to check every 30 secs to get connection data and check it if it need to be refreshed or not
But
Are you using turbopack?
Giant AngoraOP
Yes
Can you try disabling it
Answer
It can cause errors in 1% of the cases
@Anay-208 | Ping in replies It can cause errors in 1% of the cases
Giant AngoraOP
I hope
Damn i disabled turbopack its compiling is like snail
Because turbopack, I ran problems into it and haven’t used it since.
It is somewhat stable now, but the are edge cases
It is somewhat stable now, but the are edge cases
Giant AngoraOP
Hello again
Yeah didnt bugged anymore but its compile speed was exactly like a snail
But yeah it fecthsd data in each page refresh
Thank you!!❤️
@Giant Angora Yeah didnt bugged anymore but its compile speed was exactly like a snail
I had to upgrade my windows laptop from 8 GB ram to 32 GB ram for the same reason
@Anay-208 | Ping in replies Because turbopack, I ran problems into it and haven’t used it since.
It is somewhat stable now, but the are edge cases
Giant AngoraOP
So how you make guarantee your dec server speed?
@Giant Angora So how you make guarantee your dec server speed?
I’ve upgraded ram, then it works just fine
@Anay-208 | Ping in replies Can you try disabling it
Can you mark solution
@Anay-208 | Ping in replies Can you mark solution
Giant AngoraOP
Sure!
Giant AngoraOP
Thank you
Giant AngoraOP
Hello again
@Anay-208 | Ping in replies
Sorry for pinging , i got another proxy problem
Thanks if you help me ❤️
I runned production server on my vps
And domain rewrites and proxy are by cloudflare
But sometimes when i refresh page , it return 502 , and when i refresh again , it will show website
What's its problem?
As i have an interval of getting user spotify connection , now its facing 502 and wont fetch that
Any ideas??
Giant AngoraOP
Also i got a hint
I splitted api connection to one FastAPI with an subdomain
And another next.js api routes , it successfully do calls to FastAPI but it wont do calls to next.js api through vps
And after a minute , it start calling but returning 502 and 504 and when i refresh page , it return 502 soundcloud
@Giant Angora <@755810867878297610>
Create a new thread and ping me there
@Giant Angora Also i got a hint
West African Lion
It seems you're encountering 502 and 504 errors when trying to connect your Next.js API routes to your FastAPI on your VPS. These errors typically indicate that the requests are timing out, possibly due to long processing times in your FastAPI or configuration issues in your server's reverse proxy. Ensure that your reverse proxy's timeout settings are appropriately configured and check the connection limits and resource utilization on your VPS. Additionally, review the logs for both FastAPI and Next.js for error messages that can help pinpoint the exact cause of the issue.
@West African Lion It seems you're encountering 502 and 504 errors when trying to connect your Next.js API routes to your FastAPI on your VPS. These errors typically indicate that the requests are timing out, possibly due to long processing times in your FastAPI or configuration issues in your server's reverse proxy. Ensure that your reverse proxy's timeout settings are appropriately configured and check the connection limits and resource utilization on your VPS. Additionally, review the logs for both FastAPI and Next.js for error messages that can help pinpoint the exact cause of the issue.
Giant AngoraOP
Im using Nginx for rewriting to domain connected by Cloudflare
@Giant Angora Im using Nginx for rewriting to domain connected by Cloudflare
West African Lion
So do u want my help?
Giant AngoraOP
Hey
You good?
Actually i decided to move my Next.js project to Vercel , i guess using Windows server with massive problems for proxy reversing and port things was a wrong decision
Also it maked extra costs for my projects
Also it maked extra costs for my projects
@Giant Angora Hey
West African Lion
Hello? Check your DM.