System Health: To Monitor Performance
The following activity will walk you through the process of viewing and aborting running processes, as well as the use of the Request Profiler (SM205070) form in MYOB Acumatica and the Developer Tools of the browser.
Story
Suppose that your colleague has complained that the MYOB Acumatica instance sometimes has slow progress during the creation of a snapshot and when the colleague works with the Journal Transactions (GL301000) form. You need to find out what is going wrong and perform the needed actions to restore system performance.
Process Overview
You will monitor a running process during the creation of a snapshot on the Tenants (SM203520) form, abort this process by using the System Monitor (SM201530) form, and then use the Request Profiler (SM205070) form to find the SQL request with the longest execution time for the Journal Transactions (GL301000) form.
System Preparation
Launch the MYOB Acumatica website, and sign in to a company with the U100 dataset preloaded as the system administrator by using the gibbs username and the 123 password.
Step 1: Viewing and Aborting a Process
Your colleague mentioned performance being quite slow during the creation of a snapshot, so you will view and abort this process to learn more about the source of the problem. Do the following:
- Open the System Monitor (SM201530) form.
- In a new browser tab, open the Tenants (SM203520) form.
- In the Tenant ID box of the Summary area, leave the default value.
- On the form toolbar, click Create Snapshot, and in the Warning dialog box, click OK.
- In the Description box of the Create Snapshot dialog box, type Test.
- In the Export Mode box, leave Full.
- Select the Prepare for Export check box.
- In the Export Format box, leave Binary.
- Click OK.
This starts the process of creating a snapshot. Depending on the volume of data entered for the company, the process may take a significant amount of time.
- Open the browser tab with the System Monitor form, and refresh
the webpage.
On the Running Processes tab, you can see the snapshot creation process displayed in the list of currently running processes. For each running process, you can see the user who has started the process and the screen from which this process has been started. The Time column shows how long this process has been running so far.
Note:On this form, you can also monitor all batch processing operations that are currently being performed in the system, such as the release of multiple transactions at once, the preparation of dunning letters, the generation of a report, the creation of a company snapshot, or the use of an import or export scenario. Your server may be slow because of a large number of these operations running simultaneously. - On the table toolbar, click Abort.
This stops the selected running process (which is also the only running process).
Step 2: Using the Request Profiler
Your colleague also noticed poor performance of the Journal Transactions (GL301000) form. In this step, you will use the Request Profiler (SM205070) form to find the SQL request with the longest execution time for this form. Perform the following instructions:
- Navigate to the Journal Transactions (GL3010PL) list of records.
- Click Start Logging in the Profiler dialog box, which opens. The Request Profiler starts logging URL requests, SQL queries, exceptions, and warnings and errors. on the form title bar, and click
- Close the Profiler dialog box.
- Optional: Open the browser Developer Tools.
- Refresh the Journal Transactions form, and open the AP000001 batch.
- If the browser Developer Tools are open, go to the Network tab. In the list of URLs, click the URL that corresponds to the AP000001 journal transaction, and in the pane that opens, go to the Timing tab. In the Server Timing table, you can view the time spent on every action and on event handling.
- Click Stop and Export in the Profiler dialog box. The Request Profiler returns to the default monitoring and exports a ZIP archive with the log files that contain information in JSON format about the performed URL requests, SQL requests, and stack trace. on the form title bar, and click
- In the Profiler dialog box, click Open Request Profiler. The system opens the Request Profiler form.
- On the form toolbar, click Refresh Results.
- Review the requests on the Requests tab of the form, and find the request with the longest execution time in the SQL Time, ms column.
- Click this request, and click View SQL on the table toolbar.
- In the table of the View SQL dialog box, which opens, find the line with the highest value in the SQL Time, ms column, double-click it, and review the text of the SQL query and stack trace.
- Close the View SQL dialog box.
- On the form toolbar, click Clear Log to erase the logged data.