How to debug on production?

How do I debug on a live server?

  1. I am getting stripe to work on our production server, but it’s throwing an error:
    {status: "500", message: "A server error occured, to see the error enable the DEBUG flag."}
  2. I could enable the debug flag, but then the whole production server is in debug mode
  3. How can I get the error message so I can investigate what’s going wrong?

I tried to enable web server logs, but they seem empty completely

I feel like I’m missing something obvious!

Enable the debug option in server connect and check the exact error :slight_smile:

Any way to see the error message without doing this?
I am guessing that it’s not safe to enable debug for the production server?

There is nothing that much to worry about.
Just enable debug, check the error and then you can turn the debug off … it will just display the error, nothing else.

1 Like

Thanks @Teodor, then my last concern: there are not many active users now so it’s OK to keep redeploying the app. But I can imagine this to be quite disruptive later.

Any idea how I can test the integration of Stripe on the production server without so many redeploys?

Well maybe setup a staging server and test there :slight_smile:

1 Like

Makes sense, I’ll ask some advice on that in another thread then haha

I was just thinking about this same challenge.
Perhaps a tutorial on how to setup a test server and production server? someone? :wink:

1 Like

We managed to set up a staging a while ago, but we never completed it 100%. It’s not connecting to the database.

It was a LOT more complicated than I hoped, involved SSHing into the droplet of digitalocean and creating new docker composes.
Also applying the traefik rules. I guess it’s still not on the same network or something else is going wrong.

It would make life a lot easier if there’s an easy way to create a staging environment through the project settings or at least being able to docker-compose local the same file that wappler uses for portainer and traefik

Yeah, It is indeed a ‘challenge’. And besides the point you describe, there is also, in my case, a mobile application connected to the production website/api. This makes things even more complicated I guess…