-
Notifications
You must be signed in to change notification settings - Fork 306
feat: add more troubleshooting examples #2243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Patrick Derks (TrayserCassa)
wants to merge
3
commits into
main
Choose a base branch
from
add-troubleshooting
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| --- | ||
| nav: | ||
| title: Troubleshooting Common Issues | ||
| position: 90 | ||
| --- | ||
|
|
||
| # Troubleshooting Common Issues | ||
|
|
||
| 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. | ||
|
|
||
| ## Prepare your CLI context | ||
|
|
||
| If you regularly work with the same organization, project, or environment, set a default context first: | ||
|
|
||
| ```sh | ||
| sw-paas account context set | ||
| ``` | ||
|
|
||
| You can also preselect the default environment for the current shell session: | ||
|
|
||
| ```sh | ||
| export SW_PAAS_ENVIRONMENT=staging | ||
| ``` | ||
|
|
||
| This avoids repeated prompts while you troubleshoot. For more details, see the [account guide](../fundamentals/account.md). | ||
|
|
||
| ## Check timing and trace headers | ||
|
|
||
| If a page is slow, intermittently returns an error, or seems to be cached, inspect the current response timings first: | ||
|
|
||
| ```sh | ||
| sw-paas app timing --query "foo=bar" | ||
| ``` | ||
|
|
||
| Adding a query parameter helps bypass cached responses, allowing you to inspect a fresh request. | ||
|
|
||
| The following response headers are especially useful: | ||
|
|
||
| | Header | Meaning | | ||
| | ------ | ------- | | ||
| | `x-envoy-upstream-service-time` | Time spent inside the Shopware PaaS Native infrastructure for the upstream request | | ||
| | `x-trace-id` | Trace identifier that you can search for in Grafana Tempo | | ||
| | `x-timer` | Fastly timing information. The `VE` value helps estimate the time between Fastly and the origin infrastructure | | ||
|
|
||
| You can also inspect the same headers in your browser's network tab. | ||
|
|
||
| ## Check logs and traces in Grafana | ||
|
|
||
| Once you have confirmed the failing request, continue with logs and traces: | ||
|
|
||
| ```sh | ||
| sw-paas open grafana | ||
| ``` | ||
|
|
||
| Use [logs](../monitoring/logs.md) to inspect application output and [traces](../monitoring/traces.md) to follow the request path through the system. | ||
|
|
||
| If you already captured an `x-trace-id`, search for that value directly in Tempo to jump to the affected request. | ||
|
|
||
| ## My deployment finished, but the changes are not live | ||
|
|
||
| If an update appears to have completed but the application still serves the old state, inspect the application first: | ||
|
Check warning on line 61 in products/paas/shopware/guides/troubleshooting.md
|
||
|
|
||
| ```sh | ||
| sw-paas application get --application-id <application-id> | ||
| ``` | ||
|
TrayserCassa marked this conversation as resolved.
|
||
|
|
||
| The `updated` timestamp is a useful indicator. If it does not change after you triggered the update, inspect the build logs: | ||
|
|
||
| ```sh | ||
| sw-paas application build logs --application-id <application-id> | ||
| ``` | ||
|
|
||
| For the general deployment workflow, see the [applications guide](../fundamentals/applications.md). | ||
|
|
||
| ## Scheduled tasks or queue workers are stuck | ||
|
|
||
| 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: | ||
|
|
||
| ```sh | ||
| sw-paas exec --new | ||
| ``` | ||
|
|
||
| From there, run the consumers manually to surface runtime errors: | ||
|
|
||
| ```sh | ||
| bin/console messenger:consume async low_priority failed scheduler_shopware | ||
| ``` | ||
|
|
||
| If scheduled tasks are missing after a deployment or update, register them again: | ||
|
|
||
| ```sh | ||
| bin/console scheduled-task:register | ||
| ``` | ||
|
|
||
| If you need to inspect the database state directly, open a database tunnel as described in the [database guide](../resources/databases.md). | ||
|
|
||
| ## What to collect before opening support | ||
|
|
||
| If the issue is still unresolved, collect the following information before opening a support request: | ||
|
|
||
| - The affected application ID | ||
| - The failing URL | ||
| - The approximate timestamp of the failing request | ||
| - The `x-trace-id`, if available | ||
| - Relevant build or deployment log excerpts | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should also recommend the
sw-paas application deployment getto see the different events that occurred during an deployment, e.g. an migration failure.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, I think
sw-paas application deployment getis more relevent thansw-paas application get.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tom Bojer (@tombojer) / Renaud Hager (@renaudhager) - can you please update the most relevant command ?