Slow database queries on MySQL. Up to 83 seconds query time!!!
grosucristi
PROOP

a month ago

I encounter very slow database queries using the official MySQL template from railway. This DELETE query for example:


DELETE FROM `bxtool_two_factor_code`

WHERE `bxtool_two_factor_code`.`id` = ?;

took 84 seconds to run.

And this (read query):


SELECT

  `id`,

  `user_id`,

  `token`,

  `expires_at`,

  `ip_address`,

  `user_agent`,

  `created_at`,

  `updated_at`

FROM `session`

WHERE `session`.`token` = ?;

took 53 seconds to run.

Usually, all queries run super fast. However sometimes during the day one query holds up the request for so long that it times out.

After some research I discovered that the root cause might be the railway volume attached to the MySQL service.

I found this railway question about a slow query case that somebody had with MySQL one year ago. It has been marked as completed but I doubt that. During the conversation the engineering team said they applied a fix but the user who opened the question still observed slow queries.

The "railway volume" issue with slow queries needs more clarification and attention!

It is also not excluded that the problem may be elsewhere...

$20 Bounty

1 Replies

Railway
BOT

a month ago

This thread has been opened as a public bounty so the community can help solve it. The thread and any further activity are now visible to everyone.

Status changed to Open Railway about 1 month ago


travyo
PRO

22 days ago

I’ve been dealing with this issue with my MySQL database on Railway for over a month now. I’m planning to migrate away; this situation is simply unacceptable. For no apparent reason, queries start slowing down and lagging for days, then return to normal for a while—it’s a constant back-and-forth. It’s been very slow since yesterday—including right now—making it impossible to keep going.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...