I’ve just come to a realization about deadlocks – namely what they are – and I’m concerned about this issue affecting my Rails code.
Are there any specific deadlock issues to watch out for while developing a Rails app?
Have you ever encountered a deadlock in your Rails code – or is that even possible?
(I’m not referring to database deadlocks – only application deadlocks).
Deadlock implies competition for an I/O resource, which is why it comes up for databases most often. If you’re improperly locking and requesting resources and you’re explicitly using threads, then yeah you need to be concerned.
However, the specific steps to take to mitigate any issues are dependent on the type of I/O you are accessing.