Skip to content

Query resources and storage access timeout #1180

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

Merged
merged 4 commits into from
Mar 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion pages/help-center/errors/transactions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {CommunityLinks} from '/components/social-card/CommunityLinks'
While working with Memgraph, you can encounter various transaction errors. Here are some of them, along with the instructions on how to handle them:
- [Conflicting transactions](#conflicting-transaction)
- [Transaction timeout](#transaction-timeout)
- [Storage access timeout](#storage-access-timeout)

## Conflicting transactions

Expand Down Expand Up @@ -112,5 +113,31 @@ To change that, update the flag `--query-execution-timeout-sec` value to a value

Here are the [instructions](/configuration/configuration-settings#using-flags-and-config-file) on how to update the configuration.

## Storage access timeout

<CommunityLinks/>
### Error messages

Here are the storage access error messages you might encounter:

1. **Cannot access storage, unique access query is running. Try again later.**
2. **Cannot get unique access to the storage. Try stopping other queries that are running in parallel.**

### Understanding storage access timeout

Storage access timeouts occur during query preparation when the query execution engine cannot get the required type of access to the storage. There are two types of storage access:

- **Shared access**: Multiple queries can have shared access at the same time, but shared access cannot be granted while a query with unique access is running.
- **Unique access**: Only one query can have unique access at a time, and no other query can have any type of access during that period.

These timeouts prevent worker starvation and database blocking that could occur if queries were to wait indefinitely for storage access.

### Handling storage access timeout

When you encounter a storage access timeout:

1. Check for long-running queries that might be blocking storage access.
2. Consider breaking down complex queries that require unique access into smaller operations.
3. Retry the query after other queries have completed.
4. If possible, schedule queries requiring unique access during periods of lower database activity.

<CommunityLinks/>