[ERROR] [MY-013131] [Server] Out of sort memory, consider increasing server sort buffer size!
Hi, I am getting this issue on MySQL database. I am unable to query it anymore and am not sure how to resolve it. Please help, thank you!
Solution:Jump to solution
ideally you would write a more efficient query, but increasing the sort buffer size is alright
33 Replies
Project ID:
c4aab2e0-3c93-4c07-b086-ac5d458bd1b1
c4aab2e0-3c93-4c07-b086-ac5d458bd1b1
Should I try restarting or redploying my DB? What will happen to my data?
I would first upgrade to the hobby plan and then grow the volume
I am on the Pro Plan
is your project located within a pro workspace
Yes
what's the size of the attached volume
1.46 GB
what's the total size
50 GB
max size?
What do you suggest I do this is my prod db
it's completely offline?
I am unable to connect or query to it
to get it temporarily back online, have you tried to redeploy?
no
will restarting or redeploying persist my data?
I should probably restart before redeploy?
unless you have severaly misconfigured something, no your data should be in tact
would it make sense to fork the whole environment
before I try this
that doesnt copy any data
as a backup?
what can I do then to make sure it is backed up safely?
do you not take backups?
no not externally
wdym externally?
I guess should do that before I hit restart/redeploy?
i just deployed a mysql db instance on railway with an attached volume
i dont have backups beyond that
that means you dont have any backups, since railway does not do backups for you
go ahead and restart the database
dont think I should create backup first?
its a very vanilla deployment i didnt mess with config
you said you cant access the database?
ok i will try restart
hmm seems like I can access the DB from prisma studio but not the client sdk
i think identical to this issue: https://discord.com/channels/713503345364697088/1128981546544668704/1128981546544668704
I'm gonna try and setup backups first before trying restart/redeploy and will come back if none of that fixes it, thanks for help thus far
i dont think fragly's suggested fix would persist between deploys
you can permanently double the sort buffer size by appending
--sort_buffer_size=512K
onto your mysql start command@Brody I backed up and restarted it, still getting same error
Will redeploy persist / reload my data?
again, yes, unless you have severely missconfigured something
ok will do, and wil try the sort buffer size command after if no luck
Solution
ideally you would write a more efficient query, but increasing the sort buffer size is alright
yeah changing sort in my query also fixes it, thanks for the help 🙏
no problem