Chris correcting balances again
Posted: Thu May 25, 2017 7:17 pm
Chris will be correcting balances again this evening, for a period of time this morning when shares were not recorded.
Our fix of increasing memory didn't work. It turns out that upon further investigation, the increase in memory usage is due to the payout software locking the database tables, as a failsafe against unforeseen bugs that would cause balances to go below zero.
The current procedure is to begin the transaction, see if a constraint is violated, and if not, then execute the payout, and then add the fees and commit. If a payout fails, then we rollback, and if a constraint is violated, the payout never happens.
The problem is that with so many more customers, some coins now take minutes to build all the payout transactions, and during that time shares can't be recorded because an exclusive lock is held by the payout software. These shares are stored in memory to wait until the database is available, which doesn't happen for hours, and the memory gets exhausted before then. We're working on a fix for this problem and hope to have it deployed by the weekend.
We're finding that all of these issues are software, not hardware, problems, which means that given enough time it should be possible to increase stability of the system. If there were not a bubble going on right now, we might consider hiring someone to accelerate the process, but most people here can recall what it was like in 2014 and how most businesses barely survived. I've been pessimistic lately about these price rises and am very afraid of the fallout after the next crash, so we're methodically resolving these issues one at a time by ourselves until we have a better idea of what the bottom will be.
Our fix of increasing memory didn't work. It turns out that upon further investigation, the increase in memory usage is due to the payout software locking the database tables, as a failsafe against unforeseen bugs that would cause balances to go below zero.
The current procedure is to begin the transaction, see if a constraint is violated, and if not, then execute the payout, and then add the fees and commit. If a payout fails, then we rollback, and if a constraint is violated, the payout never happens.
The problem is that with so many more customers, some coins now take minutes to build all the payout transactions, and during that time shares can't be recorded because an exclusive lock is held by the payout software. These shares are stored in memory to wait until the database is available, which doesn't happen for hours, and the memory gets exhausted before then. We're working on a fix for this problem and hope to have it deployed by the weekend.
We're finding that all of these issues are software, not hardware, problems, which means that given enough time it should be possible to increase stability of the system. If there were not a bubble going on right now, we might consider hiring someone to accelerate the process, but most people here can recall what it was like in 2014 and how most businesses barely survived. I've been pessimistic lately about these price rises and am very afraid of the fallout after the next crash, so we're methodically resolving these issues one at a time by ourselves until we have a better idea of what the bottom will be.