Skip to main content
Join the Agentforce Hackathon on Nov. 18-19 to compete for a $20,000 Grand Prize. Sign up now. Terms apply.

Monitor Your Site Post-Launch

Learning Objectives

After completing this unit, you’ll be able to:

  • List the areas you can monitor in Business Manager.
  • Explain why understanding the infrastructure can help you troubleshoot problems.
  • List the types of problems that show up in the Log Center.
  • Describe two ways to avoid concurrent database operations.
  • Explain the importance of quotas.
  • List optimization best practices.

Monitor Post-Launch

As you wrap up a project, always initiate a post-launch monitoring program and get ready to troubleshoot different types of issues. It’s important that you monitor a site from day one. Continuous monitoring ensures peak performance, limited downtime, repeat shoppers, and a happy merchant.

Start by monitoring these areas in Business Manager.

Parameter/Tool

Tips

Business Manager Path

Service status

  • Check for time-outs, high-response times, and errors.
  • Adjust service profiles as needed.

Administration > Operations > Service Status

Log Center 

  • Check the log file sizes. Logs will stop being imported to Log Center after 1M log messages per day.
  • Make sure that no personally identifying information/payment card industry (PII/PCI) data appears in logs.

Administration > Site Development > Development Setup

Quotas

  • Check the quota dashboard for violations or warnings.
  • Set up email alerts for quota violations.

Administration > Operations > Quota Status

The deprecation log

  • Check the deprecation logs regularly.

Administration > Site Development > Development Setup 

Jobs

  • Check job run times and failures.
  • Set up email alerts for job failure notifications.

Administration > Operations > Jobs

Performance 

See the next unit.


Where Do I Look?

It helps to know where to look for help when problems occur. Here’s where you can start.

Area to Consider Helps You Understand Learn More

Infrastructure

How the various components work together

Troubleshooting B2C Commerce

Session ID/request ID

How to track requests and sessions

Troubleshooting with the Session ID and Request ID

Log files/Log levels

How to glean important information from the log files

Log Files

Remote includes

Additional application server requests

Understanding Remote Includes

Web adapter log files

In-depth details about web adapter requests

Troubleshooting B2C Commerce

Staging problems

How to identify and correct staging problems

Identify Staging Problems

Salesforce B2C Commerce performance

How to monitor new code after deployment to identify and prevent performance problems

Troubleshooting Salesforce B2C Commerce Performance

Database churn

How spikes in database operations can relate to creating, updating, and deleting objects in a database

Holiday Season Readiness with Salesforce B2C Commerce, the Clean Up Storefront Data unit

Reporting to customer support

Who to notify about specific types of issues and how to notify them

Salesforce B2C Commerce Customer Support

Log Center

Do you have large log files? That can mean underlying issues such as these.

  • Scripting errors
  • Unhandled exceptions
  • Poor coding
  • Service errors
  • Job errors
  • Missing files/content assets
  • Quota violations
  • Deprecation warnings

Dig deeper into the log files to determine the problem. These system limitations can cause errors in Log Center.

  • Video files are limited to 20MB. B2C Commerce supports download and play video formats such as Flash, Windows Media, and QuickTime.
  • Emails are limited to 3MB. After sending an email via B2C Commerce, you might receive an error in the logs, indicating that your email message is too large and the email failed to send.
  • Templates are limited to 10MB. If the generated output of an ISML template exceeds that, the page processing is canceled with an exception.
  • The default B2C Commerce script timeout is 30 seconds.

Do you use on-demand sandboxes? Their log messages are collected in a dedicated Log Center (credentials required). You can view the logs for the realms for which you have access based on your role.

Quotas and Performance

Quotas act as guardrails, keeping a B2C Commerce site fast and functional by monitoring resource usage in custom code. Resources include memory, application server threads, database table sizes, and more. When a quota is exceeded, it typically means that custom code uses supported capabilities inefficiently; a more efficient solution is possible.

The quota status in Business Manager is aggregated across all application servers of the instance. B2C Commerce updates an object’s quotas status with an up to 20-minute delay. It checks object relation quotas and updates status when relations are modified, not when they are traversed (navigated). Business Manager shows the status of object relation quotas and API quotas for the last 24 hours or since the server started.

Note

Private Keys and Certificates quotas are updated every 24 hours.

Here’s how to view quota data.

  1. Open Business Manager.
  2. Select Administration > Operations > Quota Status.
    In Business Manager, the Quota Alert Settings page lets you send an email notification and shows quota status.
  3. Drill down into a quota to see more details.
    In Business Manager, drill down into a quote to see more details.

Quota status is color-coded.

  • Green/ok = OK
  • Orange/warning = Near Quota Limit
  • Red/error = Action Required

Object quotas are organized into functional categories such as A/B Test, Catalog, Checkout, Content, and Customer. Object quotas and their relation quotas define the limit on the number of objects. Object quotas typically limit the number of objects of a particular type per instance, while object relation quotas limit the number of objects that can be associated with one object of that type. For example, within the Catalog object, Sub-Categories per Category is an object relation quota that enforces a limit of 1,000 subcategories per category, with a warning at 600.

Quota Overrides

Salesforce Operations enforces quotas by default on all instances. B2C Commerce Support can soften quotas on primary instances (production, staging, and development) by resetting them from error to warn. To use the same (softened) quotas on a sandbox (for testing), export those quotas from a production instance and import (overwrite) them onto a sandbox instance. The merchant needs to have a valid reason to do this—and must get approval—because it can impact performance. 

Note

Caution: You can export quota settings from all instances. However, you can only import quota settings on sandboxes. You can't import these settings into production instances.

Web Services Issues

You might have problems with a site’s web services. But you can do a lot to help your merchant prevent them from happening in the first place. Here are some suggestions. 

In Business Manager, make sure that:

  • The cartridge containing your script is in the cartridge path.
  • The web service is enabled.
  • The web service is set to Live and not Mocked.

In the source code editor (UX Studio or Visual Studio Code), make sure that:

  • You point to your initialization script in your package.json.
  • The initialization script has a service definition for your web service.
  • The service definition includes callback objects that handle the web service response.
  • You have written a script that calls your web service.
  • Your web service is available.

Database Concurrency

Sometimes data updates happen from too many places at the same time, for example, where an order status is updated from the storefront at the same time that it’s being updated by a job. Performance degrades as servers try to honor both requests. Here are some ways you can avoid such concurrent requests.

Method

Suggestions

Optimistic concurrency control

  • Have transactions use data resources without acquiring locks on them.
  • Before committing, make sure each transaction verifies that no other transaction has modified the data it has read.
  • In case of conflicting modifications, have the committing transaction roll back so it can be restarted.

Optimistic control attributes (OCA) on table records

  • Store with each object being persisted/written into the database.
  • Use them to detect parallel object modifications of multiple threads or on different application servers.
  • Make the transaction fail with an optimistic locking exception if <new OCA> != <old OCA + 1>.

To avoid optimistic locking altogether, split the processing of a large number of records into several transactions.

Optimization Best Practices

The best practice is to build performance into an application. Some sites, however, need best practice guidance such as what’s listed here.

Architectural Area

Best Practices

Client code

  • Reduce (compress) the amount of JavaScript, and simplify CSS style sheets and HTML markup.
  • Do not inject JavaScript into a document before the HTML has finished parsing.
  • Migrate from using sprite images to using vector graphics and custom fonts for icons (these result in smaller file sizes).
  • Use current CSS technology, such as CSS 3 and flexbox grids.
  • Use images optimized for the user's resolution.
  • Use ECDN speed setting to minify client-side resources.

Server

  • Optimize TLS handshake time (using TLS 1.3) via ECDN speed settings.
  • Use a caching strategy to optimize response times and avoid duplicate rendering.
  • Use optimization tools to find performance hot spots within the implementation.
    • Pipeline Profiler
    • Reports & Dashboards - Technical Reports dashboard
    • Server Framework - Service Status
    • Job Framework - Job Status
  • Analyze logs within WebDAV and Log Center.

Third-party integrations

  • Ask third-party vendors to provide their service level agreements (SLAs) and check that they align with best practices.
  • Track time-outs on back-end calls and use HTTP caching for nonpersonalized content.
  • Use the Web Services framework’s circuit breaker pattern.
  • Use offline capabilities when a back-end system is unreachable. Use fall back implementations and customizations such as falling back to the standard tax tables when the third-party tax service is offline.
  • Be aware that front-end integrations aren’t all the same.
    • Many cause a client-side performance impact.
    • A tracking pixel can reduce performance impact compared with an AJAX call.
  • Clean up old code and cartridges, and update to new LINK cartridge versions.

Next Steps

In this unit, you learned the importance of monitoring your site on day one. You learned where to look to help resolve problems and what questions to ask. Next, learn how to monitor and troubleshoot production performance.

Resources

Comparta sus comentarios de Trailhead en la Ayuda de Salesforce.

Nos encantaría saber más sobre su experiencia con Trailhead. Ahora puede acceder al nuevo formulario de comentarios en cualquier momento en el sitio de Ayuda de Salesforce.

Más información Continuar a Compartir comentarios