|
| 1 | +--- |
| 2 | +nav: |
| 3 | + title: Troubleshooting Common Issues |
| 4 | + position: 90 |
| 5 | +--- |
| 6 | + |
| 7 | +# Troubleshooting common issues |
| 8 | + |
| 9 | +This guide collects practical troubleshooting workflows for Shopware PaaS Native. It focuses on checks you can perform with the CLI, Grafana, and an application shell session. |
| 10 | + |
| 11 | +## Prepare your CLI context |
| 12 | + |
| 13 | +If you regularly work with the same organization, project, or environment, set a default context first: |
| 14 | + |
| 15 | +```sh |
| 16 | +sw-paas account context set |
| 17 | +``` |
| 18 | + |
| 19 | +You can also preselect the default environment for the current shell session: |
| 20 | + |
| 21 | +```sh |
| 22 | +export SW_PAAS_ENVIRONMENT=staging |
| 23 | +``` |
| 24 | + |
| 25 | +This avoids repeated prompts while you troubleshoot. For more details, see the [account guide](../fundamentals/account.md). |
| 26 | + |
| 27 | +## Check timing and trace headers |
| 28 | + |
| 29 | +If a page is slow, intermittently returns an error, or seems to be cached, inspect the current response timings first: |
| 30 | + |
| 31 | +```sh |
| 32 | +sw-paas app timing --query "foo=bar" |
| 33 | +``` |
| 34 | + |
| 35 | +Adding a query parameter helps bypass cached responses so you can inspect a fresh request. |
| 36 | + |
| 37 | +The following response headers are especially useful: |
| 38 | + |
| 39 | +| Header | Meaning | |
| 40 | +| ------ | ------- | |
| 41 | +| `x-envoy-upstream-service-time` | Time spent inside the Shopware PaaS Native infrastructure for the upstream request | |
| 42 | +| `x-trace-id` | Trace identifier that you can search for in Grafana Tempo | |
| 43 | +| `x-timer` | Fastly timing information. The `VE` value helps estimate the time between Fastly and the origin infrastructure | |
| 44 | + |
| 45 | +You can also inspect the same headers in your browser's network tab. |
| 46 | + |
| 47 | +## Check logs and traces in Grafana |
| 48 | + |
| 49 | +Once you have confirmed the failing request, continue with logs and traces: |
| 50 | + |
| 51 | +```sh |
| 52 | +sw-paas open grafana |
| 53 | +``` |
| 54 | + |
| 55 | +Use [logs](../monitoring/logs.md) to inspect application output and [traces](../monitoring/traces.md) to follow the request path through the system. |
| 56 | + |
| 57 | +If you already captured an `x-trace-id`, search for that value directly in Tempo to jump to the affected request. |
| 58 | + |
| 59 | +## My deployment finished, but the changes are not live |
| 60 | + |
| 61 | +If an update appears to have completed but the application still serves the old state, inspect the application first: |
| 62 | + |
| 63 | +```sh |
| 64 | +sw-paas application get --application-id <application-id> |
| 65 | +``` |
| 66 | + |
| 67 | +The `updated` timestamp is a useful indicator. If it does not change after you triggered the update, inspect the build logs: |
| 68 | + |
| 69 | +```sh |
| 70 | +sw-paas application build logs --application-id <application-id> |
| 71 | +``` |
| 72 | + |
| 73 | +For the general deployment workflow, see the [applications guide](../fundamentals/applications.md). |
| 74 | + |
| 75 | +## Scheduled tasks or queue workers are stuck |
| 76 | + |
| 77 | +If scheduled tasks remain in `queued` state for too long, start with the worker logs in Grafana. If the logs do not explain the issue, open an application shell: |
| 78 | + |
| 79 | +```sh |
| 80 | +sw-paas exec --new |
| 81 | +``` |
| 82 | + |
| 83 | +From there, run the consumers manually to surface runtime errors: |
| 84 | + |
| 85 | +```sh |
| 86 | +bin/console messenger:consume async low_priority failed scheduler_shopware |
| 87 | +``` |
| 88 | + |
| 89 | +If scheduled tasks are missing after a deployment or update, register them again: |
| 90 | + |
| 91 | +```sh |
| 92 | +bin/console scheduled-task:register |
| 93 | +``` |
| 94 | + |
| 95 | +If you need to inspect the database state directly, open a database tunnel as described in the [database guide](../resources/databases.md). |
| 96 | + |
| 97 | +## What to collect before opening support |
| 98 | + |
| 99 | +If the issue is still unresolved, collect the following information before opening a support request: |
| 100 | + |
| 101 | +- The affected application ID |
| 102 | +- The failing URL |
| 103 | +- The approximate timestamp of the failing request |
| 104 | +- The `x-trace-id`, if available |
| 105 | +- Relevant build or deployment log excerpts |
0 commit comments