NextJS API with Cloudflare as reverse proxy

What is the name of the domain?

projectarda.com

What is the error number?

504

What is the error message?

504 Gateway Timeout

What is the issue you’re encountering

In NextJS i have created an API that writes data to my local SQLite db. In dev it works perfectly but on prod i get a 504 Gateway Timeout. My app is self hosted in a VM on a centos with pm2 and nginx. I use cloudflare only as a reverse proxy for extra security.

What steps have you taken to resolve the issue?

I have tried to disable cacheing.
Do i need any other settings enabled/disabled on Cloudflare?
On my router i only allow Cloudflare IPs and only on 443 it is a problem?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.