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

Deadlock detected on PUT /fulfillment (postgres) #323

Open
vhpoet opened this issue Sep 12, 2016 · 2 comments
Open

Deadlock detected on PUT /fulfillment (postgres) #323

vhpoet opened this issue Sep 12, 2016 · 2 comments

Comments

@vhpoet
Copy link
Contributor

vhpoet commented Sep 12, 2016

The exception

{  
   "name":"ledger",
   "hostname":"vahe-2.local",
   "pid":18512,
   "module":"error-handler",
   "level":50,
   "err":{  
      "message":"insert into \"L_ENTRIES\" (\"ACCOUNT_ID\", \"TRANSFER_ID\") values ($1, $2) - deadlock detected",
      "name":"error",
      "stack":"error: deadlock detected\n    at Connection.parseE (/Users/vh/localhost/ripple/five-bells-wallet/node_modules/pg/lib/connection.js:539:11)\n    at Connection.parseMessage (/Users/vh/localhost/ripple/five-bells-wallet/node_modules/pg/lib/connection.js:366:17)\n    at Socket.<anonymous> (/Users/vh/localhost/ripple/five-bells-wallet/node_modules/pg/lib/connection.js:105:22)\n    at emitOne (events.js:96:13)\n    at Socket.emit (events.js:188:7)\n    at readableAddChunk (_stream_readable.js:177:18)\n    at Socket.Readable.push (_stream_readable.js:135:10)\n    at TCP.onread (net.js:542:20)\nFrom previous event:\n    at Client._query (/Users/vh/localhost/ripple/five-bells-wallet/node_modules/knex/lib/dialects/postgres/index.js:150:12)\n    at Client.query (/Users/vh/localhost/ripple/five-bells-wallet/node_modules/knex/lib/client.js:136:24)\n    at /Users/vh/localhost/ripple/five-bells-wallet/node_modules/knex/lib/transaction.js:225:21\nFrom previous event:\n    at Client.trxClient.query (/Users/vh/localhost/ripple/five-bells-wallet/node_modules/knex/lib/transaction.js:222:26)\n    at Runner.<anonymous> (/Users/vh/localhost/ripple/five-bells-wallet/node_modules/knex/lib/runner.js:115:24)\nFrom previous event:\n    at /Users/vh/localhost/ripple/five-bells-wallet/node_modules/knex/lib/runner.js:43:21\nFrom previous event:\n    at Runner.run (/Users/vh/localhost/ripple/five-bells-wallet/node_modules/knex/lib/runner.js:29:20)\n    at QueryBuilder.Target.then (/Users/vh/localhost/ripple/five-bells-wallet/node_modules/knex/lib/interface.js:26:43)\n    at runCallback (timers.js:566:20)\n    at tryOnImmediate (timers.js:546:5)\n    at processImmediate [as _immediateCallback] (timers.js:525:5)",
      "code":"40P01"
   },
   "msg":"insert into \"L_ENTRIES\" (\"ACCOUNT_ID\", \"TRANSFER_ID\") values ($1, $2) - deadlock detected",
   "time":"2016-09-12T21:19:33.133Z",
   "v":0
}

Formatted stack trace.

error: deadlock detected
    at Connection.parseE (/Users/vh/localhost/ripple/five-bells-wallet/node_modules/pg/lib/connection.js:539:11)
    at Connection.parseMessage (/Users/vh/localhost/ripple/five-bells-wallet/node_modules/pg/lib/connection.js:366:17)
    at Socket.<anonymous> (/Users/vh/localhost/ripple/five-bells-wallet/node_modules/pg/lib/connection.js:105:22)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:177:18)
    at Socket.Readable.push (_stream_readable.js:135:10)
    at TCP.onread (net.js:542:20)
From previous event:
    at Client._query (/Users/vh/localhost/ripple/five-bells-wallet/node_modules/knex/lib/dialects/postgres/index.js:150:12)
    at Client.query (/Users/vh/localhost/ripple/five-bells-wallet/node_modules/knex/lib/client.js:136:24)
    at /Users/vh/localhost/ripple/five-bells-wallet/node_modules/knex/lib/transaction.js:225:21
From previous event:
    at Client.trxClient.query (/Users/vh/localhost/ripple/five-bells-wallet/node_modules/knex/lib/transaction.js:222:26)
    at Runner.<anonymous> (/Users/vh/localhost/ripple/five-bells-wallet/node_modules/knex/lib/runner.js:115:24)
From previous event:
    at /Users/vh/localhost/ripple/five-bells-wallet/node_modules/knex/lib/runner.js:43:21
From previous event:
    at Runner.run (/Users/vh/localhost/ripple/five-bells-wallet/node_modules/knex/lib/runner.js:29:20)
    at QueryBuilder.Target.then (/Users/vh/localhost/ripple/five-bells-wallet/node_modules/knex/lib/interface.js:26:43)
    at runCallback (timers.js:566:20)
    at tryOnImmediate (timers.js:546:5)
    at processImmediate [as _immediateCallback] (timers.js:525:5)
@justmoon
Copy link
Contributor

justmoon commented Dec 7, 2016

I believe this might have been fixed with 4a8ed1c

Any way to confirm?

@vhpoet
Copy link
Contributor Author

vhpoet commented Dec 7, 2016

@justmoon It might've been caused by 200tps stress test, will try to test it today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants