Mastering SSH Access for Custom App Debugging in Empress

Introduction

Welcome to our guide on how to use SSH Access for debugging custom apps in Empress. SSH Access is a powerful feature that allows you to identify and solve issues that might occur while deploying custom apps. This feature is an essential tool that ensures your business operations run smoothly on Empress.

Introduction: What is SSH Access and Why it Matters?

SSH Access is a feature in Empress that allows you to access and debug your custom apps. With the ability to create custom apps tailored to your business needs on Empress, you might sometimes encounter issues that require troubleshooting. That’s where SSH Access comes into play. It allows you to debug these issues and ensure the smooth running of your custom apps.

Note: SSH Access should be used strictly for debugging purposes. Please avoid running any arbitrary bench commands that modify configuration as it could potentially disrupt your bench.

Reading Log Files with SSH Access

Once you’re inside your bench through SSH Access, you can navigate to the logs directory. This directory contains several log files that are instrumental in your debugging process:

  1. web.log and web.err.log: These logs manage the web requests to your site.
  2. worker.log and worker.err.log: These logs handle the execution of background jobs.

To read these log files, you can use the less command. If you want to read from the bottom, use less +G. The tail command is also handy, especially tail -f, which lets you read output as it is being written to the file.

How to Debug with Bench Commands

Bench commands are useful tools for debugging. For instance, the bench doctor command provides you with the status of background jobs on your bench. If you make any changes to your files after accessing SSH, you will need to run bench restart for the changes to take effect.

Viewing Database Queries

With SSH Access, you can view the status of your database by accessing the SQL console using the bench mariadb command. The SHOW PROCESSLIST command, for instance, allows you to view the currently running queries.

Understanding the Role of Supervisor

Supervisor is the process manager on your bench. When your bench is functioning correctly, all processes should be in the RUNNING state when you execute the supervisorctl status command. You can use supervisorctl commands to start and stop listed processes.

Conclusion: Enhancing Business Processes with SSH Access

SSH Access is a powerful feature in Empress that enables you to debug and resolve issues in your custom apps, ensuring your business operations run smoothly. Remember, SSH Access should be used strictly for debugging purposes. Misuse of the feature could disrupt your bench.

For more information or support, please refer to our non-technical resources or contact our support team. We’re here to help you make the most out of Empress for your business.