Skip to content
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

🐛 Bug Report: adding attribute in a large collection crashes #6028

Closed
2 tasks done
AidenY69 opened this issue Aug 22, 2023 · 11 comments
Closed
2 tasks done

🐛 Bug Report: adding attribute in a large collection crashes #6028

AidenY69 opened this issue Aug 22, 2023 · 11 comments
Labels
bug Something isn't working product / databases Fixes and upgrades for the Appwrite Database. question Further information is requested stale

Comments

@AidenY69
Copy link

👟 Reproduction steps

Make a collection with over 40 million items, try adding a new attribute.

👍 Expected behavior

A new attribute should be added

👎 Actual Behavior

It crashes instead.

Is there a way to use command line to add a new attribute or some 'backdoor' method? Bash script to just run through every item in the database line by line?

🎲 Appwrite version

Version 1.3.x

💻 Operating system

Linux

🧱 Your Environment

No response

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@AidenY69 AidenY69 added the bug Something isn't working label Aug 22, 2023
@joeyouss
Copy link

Hi @AidenY69
Answering your question - Yes it is possible but not recommended
Also, can you provide few details to me about whether you are using self hosted or cloud version, what is the error message?

@joeyouss joeyouss self-assigned this Aug 22, 2023
@joeyouss joeyouss added the product / databases Fixes and upgrades for the Appwrite Database. label Aug 22, 2023
@AidenY69
Copy link
Author

Hi @AidenY69 Answering your question - Yes it is possible but not recommended Also, can you provide few details to me about whether you are using self hosted or cloud version, what is the error message?

  1. we are using docker self-hosted version
  2. error message from the appwrite worker-databases container is: "SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction"

@joeyouss
Copy link

joeyouss commented Aug 26, 2023

hi @AidenY69 thank you for the update, I will be looking into it and get back to you : )

@fogelito
Copy link
Contributor

Hey @AidenY69 , Can you show create the table structure, please? It is always better to add an attribute on such a big scale when you have minimum traffic. looks like you have exceeded the time for waiting for a lock which default is 50 sec.

@fogelito
Copy link
Contributor

fogelito commented Aug 29, 2023

Is it possible to stop the writes for this collection, from somewhere in your code? or limit the traffic using this collection?
before adding the attribute?

@fogelito
Copy link
Contributor

You can try setting innodb_lock_wait_timeout for more seconds like 120 seconds.

@AidenY69
Copy link
Author

The website is actually complete shutdown (maiantence mode) when these operations occur, so 0 traffic. The lockout timeout was raised and still the same issue.

@fogelito
Copy link
Contributor

What is the error you get in the appwrite-mariadb container?

@DH-555
Copy link
Member

DH-555 commented Dec 12, 2024

@AidenY69 Are you still experiencing this issue?

@DH-555 DH-555 added the question Further information is requested label Dec 12, 2024
Copy link

This issue has been labeled as a 'question', indicating that it requires additional information from the requestor. It has been inactive for 7 days. If no further activity occurs, this issue will be closed in 14 days.

@github-actions github-actions bot added the stale label Dec 20, 2024
Copy link

github-actions bot commented Jan 4, 2025

This issue has been closed due to inactivity. If you still require assistance, please provide the requested information.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product / databases Fixes and upgrades for the Appwrite Database. question Further information is requested stale
Projects
None yet
Development

No branches or pull requests

4 participants