### Troubleshoot 404 Error on Web Setup Wizard Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/toc-backup.md This guide helps resolve a 404 Not Found error when accessing the Web Setup Wizard via the Admin panel in Adobe Commerce. It covers common causes and solutions. ```bash php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -f ``` -------------------------------- ### Fix 'run setup:static-content:deploy' Deployed Version Issue Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/toc-backup.md This troubleshooting guide addresses issues with the `setup:static-content:deploy` command in Adobe Commerce, specifically related to the `deployed_version.txt` file. It may involve clearing caches or manually updating the version file. ```bash rm pub/static/deployed_version.txt php bin/magento setup:static-content:deploy ``` -------------------------------- ### SQL Code Block Formatting Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/wiki/guides/kb-formatting-guide.md Provides an example of how to format a SQL code block using triple backticks and specifying 'sql' for syntax highlighting. This ensures code is displayed correctly and is readable. ```sql SELECT TABLE_NAME AS `Table`, ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024) AS `Size (MB)` FROM information_schema.TABLES WHERE TABLE_SCHEMA = "%project_id%" ORDER BY (DATA_LENGTH + INDEX_LENGTH) DESC; ``` -------------------------------- ### Ordered List Formatting in Markdown Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/wiki/guides/kb-formatting-guide.md Illustrates the Markdown syntax for creating ordered (numbered) lists. Each list item should start with a number followed by a period and a space. Blank lines are required before and after the list. ```markdown 1. First numbered list item. 1. Second numbered list item. ... 1. Last numbered list item. ``` -------------------------------- ### Troubleshoot API Keys for Adobe AI Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/toc-backup.md This guide assists in troubleshooting issues with API keys configured for Adobe AI, specifically when only one SaaS data space is visible. It covers API key setup and integration. ```bash # Example: Verify API key configuration in environment variables echo $ADOBE_API_KEY ``` -------------------------------- ### Resolve Redis Unserialize Errors with `setup:static-content:deploy` in Adobe Commerce Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/toc-backup.md This guide focuses on resolving `unserialize` errors related to Redis when deploying static content in Adobe Commerce. It provides steps to ensure Redis is properly configured and compatible with the static content deployment process. ```bash php bin/magento setup:static-content:deploy ``` -------------------------------- ### Configure PHP mcrypt Extension for Adobe Commerce Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/TOC.md This guide focuses on troubleshooting issues related to the PHP mcrypt extension not being installed or configured properly for Adobe Commerce. It provides steps to verify installation and enable the extension. ```shell # Check if mcrypt is enabled php -m | grep mcrypt # If not installed, install using package manager (example for Debian/Ubuntu) # sudo apt-get update # sudo apt-get install php-mcrypt # Restart web server and PHP-FPM after installation # sudo systemctl restart apache2 # sudo systemctl restart php*-fpm ``` -------------------------------- ### Set up Fastly for Starter Plan on Cloud Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/toc-backup.md This guide explains how to set up Fastly, a CDN, for the Starter plan on Adobe Commerce Cloud infrastructure. Proper Fastly configuration is essential for improving website performance and reducing server load. This involves configuring DNS and Fastly service settings. ```Bash # Setting up Fastly on Adobe Commerce Cloud Starter plan typically involves: # 1. Accessing your Fastly account provided by Adobe. # - You'll receive credentials or instructions to log in. # 2. Configuring DNS settings: # - Update your domain's DNS records (e.g., CNAME) to point to Fastly's servers. # - This is usually done through your domain registrar or DNS provider. # 3. Configuring the Fastly service: # - Log in to the Fastly control panel. # - Select your service. # - Set the 'Origin' server to your Adobe Commerce Cloud environment's hostname. # - Configure caching rules, security settings (e.g., TLS/SSL), and other optimizations. # 4. Deploying Fastly configuration changes. # Example (conceptual - Fastly UI is primarily used): # If using Fastly API or CLI for advanced configurations: # fastly service domain create --domain yourdomain.com --service-id # fastly service domain update --domain yourdomain.com --service-id --hostname # Consult Adobe Commerce Cloud documentation for specific hostnames and recommended Fastly settings. echo "Fastly setup initiated for Starter plan. DNS and Fastly service configuration required." ``` -------------------------------- ### Create a Patch for Composer Installation from GitHub Commit (Bash) Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/TOC.md This guide explains how to create a patch file for an Adobe Commerce Composer installation by referencing a specific commit from a GitHub repository. This is useful for applying custom fixes or features. ```bash #!/bin/bash # Define repository URL and commit hash REPO_URL="https://github.com/magento/magento2.git" COMMIT_HASH="abcdef1234567890abcdef1234567890abcdef12" # Create a temporary directory for cloning TEMP_DIR="/tmp/magento_patch_temp" mkdir -p "$TEMP_DIR" cd "$TEMP_DIR" # Clone the repository git clone "$REPO_URL" magento2_repo cd magento2_repo # Checkout the specific commit git checkout "$COMMIT_HASH" # Generate the patch file (assuming you have a base commit or tag to compare against) # Replace 'base_commit_or_tag' with an actual commit hash or tag from your project git diff base_commit_or_tag HEAD > ../magento2_custom_patch.diff # Clean up temporary directory cd "$TEMP_DIR" rm -rf magento2_repo echo "Patch file 'magento2_custom_patch.diff' created successfully." ``` -------------------------------- ### Example Deployment Log Configuration Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/troubleshooting/miscellaneous/poor-performance-in-integration-environments.md This snippet shows an example of environment configuration details found in a deployment log. It indicates the size and disk allocation for various services like PHP, MySQL, Redis, OpenSearch, and RabbitMQ. This helps in identifying if the environment is on the Enhanced Integration configuration. ```text Environment configuration mymagento (type: php:8.2, size: XL, disk: 5120) mysql (type: mysql:10.6, size: L, disk: 5120) redis (type: redis:7.2, size: L) opensearch (type: opensearch:2, size: L, disk: 1024) rabbitmq (type: rabbitmq:3.12, size: L, disk: 1024) ``` -------------------------------- ### Configure Nginx Timeout for Setup Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/troubleshooting/installation-and-upgrade/installation-stops-at-about-70.md This snippet shows how to configure Nginx to increase the timeout for the setup process. It involves modifying the `location ~ ^/setup/index.php` block in your Nginx host configuration file to set `fastcgi_read_timeout` and `fastcgi_connect_timeout` to 600 seconds. This prevents the installation from timing out during lengthy operations. ```nginx location ~ ^/setup/index.php { ..................... fastcgi_read_timeout 600s; fastcgi_connect_timeout 600s; } ``` -------------------------------- ### Install xdebug for Maximum Function Nesting Level Error Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/toc-backup.md This troubleshooting guide focuses on resolving the 'maximum function nesting level' error during xdebug installation by adjusting PHP configuration settings. ```ini [xdebug] xdebug.max_nesting_level = 2000 ``` -------------------------------- ### Sample MySQL Process List Output (MySQL) Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/troubleshooting/database/checking-slow-queries-and-processes-mysql.md This is an example of the output you might see when running the 'show processlist;' command in MySQL. It displays information about active connections, including their ID, user, host, database, command type, execution time, state, and the query being executed. ```mysql `$ mysql -h $MYSQL_HOST -u $DB_USER --password=$MYSQL_PWD $DB_NAME -U -A -e 'show processlist;' +-----------+---------------+--------------------+---------------+---------+------+----------------+------------------------------------------------------------------------------------------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +-----------+---------------+--------------------+---------------+---------+------+----------------+------------------------------------------------------------------------------------------------------+----------+ | 123456789 | abcdefghijklm | 192.168.7.10:12345 | abcdefghijklm | Query | 0 | Writing to net | SELECT `magento_versionscms_hierarchy_node`.*, `page_table`.`title` AS `page_title`, `page_table`.`i | 0.000 | | 123456788 | abcdefghijklm | 192.168.7.10:12344 | abcdefghijklm | Sleep | 0 | | NULL | 0.000 | | 123456777 | abcdefghijklm | 192.168.7.10:12333 | abcdefghijklm | Sleep | 0 | | NULL | 0.000 | | 123456666 | abcdefghijklm | 192.168.5.8:12222 | abcdefghijklm | Sleep | 0 | | NULL | 0.000 |` ``` -------------------------------- ### PHP Exception during Adobe Commerce B2B Install Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/troubleshooting/installation-and-upgrade/magento-2-4-0-known-issue-exception-during-b2b-1-2-0-install.md This PHP exception occurs during the `setup:upgrade` process when installing B2B 1.2.0 on Adobe Commerce 2.4.0. It indicates that DDL statements are not allowed in transactions for the `Magento_PurchaseOrder` module's data patch. ```php Module 'Magento_PurchaseOrder': Unable to apply data patch Magento\PurchaseOrder\Setup\Patch\Data\InitPurchaseOrderSalesSequence for module Magento_PurchaseOrder. Original exception message: DDL statements are not allowed in transactions ``` -------------------------------- ### Run setup:di:compile Command Manually Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/toc-backup.md This snippet provides the command to manually run the `setup:di:compile` command in Adobe Commerce. This is often necessary when encountering errors during the compilation process, which is crucial for dependency injection in the application. ```bash php bin/magento setup:di:compile ``` -------------------------------- ### Resolve Installation Xdebug Maximum Function Nesting Level Error Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/toc-backup.md This guide helps troubleshoot the 'xdebug maximum function nesting level' error during Adobe Commerce installation. It provides instructions on adjusting Xdebug or PHP settings to resolve this. ```PHP ; Example php.ini configuration for Xdebug (placeholder) ; This is a placeholder and does not represent actual code from the document. [xdebug] xdebug.mode = develop,debug xdebug.start_with_request = yes xdebug.client_host = 127.0.0.1 xdebug.client_port = 9003 ; Increase nesting level if necessary, but use with caution xdebug.max_nesting_level = 500 ; Corresponding PHP setting (if not using Xdebug's override) ; max_nesting_level = 500 ``` -------------------------------- ### Log in to MySQL and Show Process List (Shell) Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/troubleshooting/database/checking-slow-queries-and-processes-mysql.md This script automates logging into MySQL by extracting database credentials from the app/etc/env.php file. It then executes the 'show processlist;' command to display active MySQL processes. Ensure you have the necessary permissions to read env.php and execute MySQL commands. ```shell export DB_NAME=$(grep [\']db[\'] -A 20 app/etc/env.php | grep dbname | head -n1 | sed "s/.*[=][>] *[']//" | sed "s/['][,]//"); export MYSQL_HOST=$(grep [\']db[\'] -A 20 app/etc/env.php | grep host | head -n1 | sed "s/.*[=][>] *[']//" | sed "s/['][,]//"); export DB_USER=$(grep [\']db[\'] -A 20 app/etc/env.php | grep username | head -n1 | sed "s/.*[=][>] *[']//" | sed "s/['][,]//"); export MYSQL_PWD=$(grep [\']db[\'] -A 20 app/etc/env.php | grep password | head -n1 | sed "s/.*[=][>] *[']//" | sed "s/[']$//" | sed "s/['][,]//"); mysql -h $MYSQL_HOST -u $DB_USER --password=$MYSQL_PWD $DB_NAME -U -A -e 'show processlist;' ``` -------------------------------- ### Image Resizing with HTML Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/wiki/guides/kb-formatting-guide.md Explains how to customize the display size of an image using an HTML `` tag. This method allows for specific width adjustments, overriding default image rendering. ```html your alt text ``` -------------------------------- ### Identify Adobe Commerce Installation Error with Nginx Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/troubleshooting/installation-and-upgrade/cannot-install-using-nginx.md This code snippet shows the typical error message found in the `var/report` directory when an Adobe Commerce installation fails due to Nginx configuration issues. It indicates that the Setup Wizard cannot access the necessary directory and suggests using the command line or restoring directory access. ```php NOTE: You cannot install Adobe Commerce using the Setup Wizard because the Adobe Commerce setup directory cannot be accessed. You can install Adobe Commerce using either the command line or you must restore access to the following directory: /var/www/html/setup If you are using the sample nginx configuration, please go to http://ce.mtf03.bcn.magento.com/setup/";i:1;s:641:"#0 /var/www/html/lib/internal/Magento/Framework/App/Http.php(213): Magento\Framework\App\Http->redirectToSetup(Object(Magento\Framework\App\Bootstrap), Object(Exception)) ``` -------------------------------- ### Create a Patch for Adobe Commerce Composer Installation from GitHub Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/toc-backup.md This guide details how to create a patch for an Adobe Commerce Composer installation using a commit from a GitHub repository. This is useful for applying specific fixes or features from a version-controlled source. The process involves using Composer and Git commands. ```Bash # Navigate to your Magento project root cd /path/to/your/magento/project # Ensure your composer.json is up-to-date and has the correct repository # Example: Add a VCS repository for a custom module # composer config repositories.my-custom-module vcs https://github.com/your-username/your-repo.git # Require the module with a specific commit hash # composer require vendor/module-name:"dev-main#abcdef1234567890" # If you need to create a patch from a specific commit to apply to your current installation: # 1. Checkout the commit you want to patch from # git checkout abcdef1234567890 # 2. Make sure your local Magento installation is clean or at the target version # 3. Generate the diff # git diff > ../my-patch.diff # To apply the patch: # cd /path/to/your/magento/project # git apply ../my-patch.diff # After applying the patch, you might need to recompile and redeploy # php bin/magento setup:di:compile # php bin/magento setup:static-content:deploy echo "Patch created or applied. Remember to recompile and redeploy." ``` -------------------------------- ### Apply Composer Patch for Adobe Commerce Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/TOC.md This snippet demonstrates how to apply a composer patch provided by Adobe to your Adobe Commerce project. It requires Composer to be installed and accessible in your environment. The command modifies the composer.json file and installs the patched version of the package. ```bash composer require /: composer update ``` -------------------------------- ### Import Database Snapshot Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/how-to/general/restore-a-db-snapshot-from-staging-or-production.md Imports a gzipped SQL database backup into the MySQL server. It uses `zcat` to decompress the file and `sed` to modify the DEFINER clause before piping the output to `mysql` for import. Commands are provided for Production, Staging, and other environments. ```bash # For importing the database backup from Production zcat .sql.gz | sed -e 's/DEFINER[ ]*=[ ]*[^*]*\*/\*/' | mysql -h 127.0.0.1 -p -u ``` ```bash # For importing the database backup from Staging zcat .sql.gz | sed -e 's/DEFINER[ ]*=[ ]*[^*]*\*/\*/' | mysql -h 127.0.0.1 -p -u ``` ```bash # For importing a database backup from any other environment zcat .sql.gz | sed -e 's/DEFINER[ ]*=[ ]*[^*]*\*/\*/' | mysql -h 127.0.0.1 -p -u ``` -------------------------------- ### Troubleshoot New Relic Performance Monitoring Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/toc-backup.md This guide details how to troubleshoot New Relic integration for performance monitoring on Adobe Commerce on cloud infrastructure. It covers setup and common issues. ```bash # Example: Check New Relic agent status sudo service newrelic-daemon status ``` -------------------------------- ### Connect to Local Database (Bash) Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/how-to/general/restore-a-db-snapshot-from-staging-or-production.md This command connects to a local MySQL or MariaDB database instance. It requires the host, port, username, and database name as parameters. Ensure the database server is running and accessible. ```bash mysql -h -P -p -u ``` -------------------------------- ### Error Message: Out of Memory during Magento Installation/Upgrade Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/troubleshooting/installation-and-upgrade/out-of-memory-error-during-install-or-upgrade.md This code snippet displays the typical error message encountered when the system runs out of memory during an Adobe Commerce or Magento Open Source installation or upgrade process, either through the Web Setup Wizard or the command line. ```bash Could not complete update {"components":[ {"name":"magento/module-bundle-sample-data","version":"100.1.0"} ]} successfully: proc_open(): fork failed - Cannot allocate memory ``` ```bash proc_open(): fork failed - Cannot allocate memory ``` -------------------------------- ### Check Host Instance Upsize Needs for Adobe Commerce Cloud Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/toc-backup.md This guide explains how to determine if an upsize for host instances is needed for Adobe Commerce on cloud infrastructure. Monitoring resource utilization (CPU, memory) is key to identifying performance bottlenecks and planning for scaling. This often involves using monitoring tools or CLI commands. ```Bash # SSH into your Adobe Commerce Cloud environment # Example: ssh @.{region}.magento.cloud # Navigate to the appropriate directory if needed # cd /var/www/html # Check CPU utilization (example using top or htop) # Run 'top' or 'htop' and observe the CPU% column for processes. # Look for consistently high CPU usage (e.g., > 80-90%) across multiple cores. # Check memory utilization (example using free) free -h # Look for low available memory and high swap usage. # Use Adobe Commerce Cloud specific tools if available (check documentation for specific commands) # Example: vendor/bin/ece-tools sys:check # Monitor application performance metrics via New Relic or other APM tools. echo "Monitor CPU, memory, and application performance. If consistently high, consider an upsize." ``` -------------------------------- ### Fix File Permissions for One-User Setup (Bash) Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/troubleshooting/miscellaneous/file-permissions-readiness-check-issues.md This command resolves file permission issues for a one-user setup in Adobe Commerce. It recursively grants write permissions to files and directories within specified paths and makes the `magento` executable runnable. Assumes Adobe Commerce is installed in `/var/www/html/magento2`. ```bash $ cd /var/www/html/magento2 && find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + && find var vendor pub/static pub/media app/etc -type d -exec chmod g+w {} + && chmod u+x bin/magento ``` -------------------------------- ### Troubleshoot File Permissions Readiness Check Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/toc-backup.md This guide addresses issues with file permissions during the readiness check in Adobe Commerce. It provides guidance on setting correct permissions to avoid errors. ```bash # Example: Set correct ownership and permissions sudo find . -type f -exec chmod 644 {} \; sudo find . -type d -exec chmod 755 {} \; sudo chown -R : ./ ``` -------------------------------- ### Example Origin URLs for [!DNL Fastly] Origin Cloaking Source: https://github.com/adobedocs/commerce-knowledge-base.en/blob/main/help/faq/general/fastly-origin-cloaking-enablement-faq.md These examples show the format of origin URLs for different environments (Production, Staging, StagingX) that are subject to [!DNL Fastly] origin cloaking. This feature blocks direct traffic to these specific origin hostnames. ```php mywebsite.com.c.abcdefghijkl.ent.magento.cloud ``` ```php mcstaging2.mywebsite.com.c.abcdefghijkl.dev.ent.magento.cloud ``` ```php mcstagingX.mywebsite.com.c.abcdefghijkl.X.dev.ent.magento.cloud ```