-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathdocker-compose.logs
500 lines (500 loc) · 27.3 KB
/
docker-compose.logs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
Network canabrava_default Creating
Network canabrava_default Created
Container postgres Creating
Container postgres Created
Container api2 Creating
Container pgbouncer Creating
Container api1 Creating
Container api2 Created
Container api1 Created
Container pgbouncer Created
Container nginx Creating
Container nginx Created
Attaching to api1, api2, nginx, pgbouncer, postgres
postgres | The files belonging to this database system will be owned by user "postgres".
postgres | This user must also own the server process.
postgres |
postgres | The database cluster will be initialized with locale "en_US.utf8".
postgres | The default database encoding has accordingly been set to "UTF8".
postgres | The default text search configuration will be set to "english".
postgres |
postgres | Data page checksums are disabled.
postgres |
postgres | fixing permissions on existing directory /var/lib/postgresql/data ... ok
postgres | creating subdirectories ... ok
postgres | selecting dynamic shared memory implementation ... posix
postgres | selecting default max_connections ... 100
postgres | selecting default shared_buffers ... 128MB
postgres | selecting default time zone ... Etc/UTC
postgres | creating configuration files ... ok
postgres | running bootstrap script ... ok
postgres | performing post-bootstrap initialization ... ok
postgres | syncing data to disk ... ok
postgres |
postgres |
postgres | Success. You can now start the database server using:
postgres |
postgres | pg_ctl -D /var/lib/postgresql/data -l logfile start
postgres |
postgres | initdb: warning: enabling "trust" authentication for local connections
postgres | initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
postgres | waiting for server to start....2024-03-06 21:53:01.909 GMT [48] LOG: starting PostgreSQL 16.2 (Debian 16.2-1.pgdg120+2) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
postgres | 2024-03-06 21:53:01.912 GMT [48] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres | 2024-03-06 21:53:01.922 GMT [51] LOG: database system was shut down at 2024-03-06 21:53:01 GMT
postgres | 2024-03-06 21:53:01.936 GMT [48] LOG: database system is ready to accept connections
postgres | done
postgres | server started
postgres |
postgres | /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/init.sql
postgres | CREATE TABLE
postgres | CREATE TABLE
postgres | CREATE INDEX
postgres | CREATE INDEX
postgres | DO
postgres |
postgres |
postgres | waiting for server to shut down...2024-03-06 21:53:02.077 GMT [48] LOG: received fast shutdown request
postgres | .2024-03-06 21:53:02.080 GMT [48] LOG: aborting any active transactions
postgres | 2024-03-06 21:53:02.081 GMT [48] LOG: background worker "logical replication launcher" (PID 54) exited with exit code 1
postgres | 2024-03-06 21:53:02.115 GMT [49] LOG: shutting down
postgres | 2024-03-06 21:53:02.118 GMT [49] LOG: checkpoint starting: shutdown immediate
postgres | 2024-03-06 21:53:02.261 GMT [49] LOG: checkpoint complete: wrote 71 buffers (0.4%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.008 s, sync=0.122 s, total=0.147 s; sync files=50, longest=0.098 s, average=0.003 s; distance=208 kB, estimate=208 kB; lsn=0/151EBD0, redo lsn=0/151EBD0
postgres | 2024-03-06 21:53:02.264 GMT [48] LOG: database system is shut down
postgres | done
postgres | server stopped
postgres |
postgres | PostgreSQL init process complete; ready for start up.
postgres |
postgres | 2024-03-06 21:53:02.300 GMT [1] LOG: starting PostgreSQL 16.2 (Debian 16.2-1.pgdg120+2) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
postgres | 2024-03-06 21:53:02.300 GMT [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
postgres | 2024-03-06 21:53:02.300 GMT [1] LOG: listening on IPv6 address "::", port 5432
postgres | 2024-03-06 21:53:02.308 GMT [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres | 2024-03-06 21:53:02.315 GMT [64] LOG: database system was shut down at 2024-03-06 21:53:02 GMT
postgres | 2024-03-06 21:53:02.325 GMT [1] LOG: database system is ready to accept connections
pgbouncer | Creating pgbouncer config in /etc/pgbouncer
pgbouncer | #pgbouncer.ini
pgbouncer |
pgbouncer | [databases]
pgbouncer | * = host = postgres port=5432 user=postgres password=postgres dbname=postgres pool_size=30
pgbouncer |
pgbouncer | [pgbouncer]
pgbouncer | listen_addr = 0.0.0.0
pgbouncer | auth_type = any
pgbouncer | max_client_conn = 30
pgbouncer | default_pool_size = 30
pgbouncer | reserve_pool_size = 30
pgbouncer | ignore_startup_parameters = extra_float_digits
pgbouncer |
pgbouncer | # Log settings
pgbouncer | admin_users = postgres
pgbouncer |
pgbouncer | # Connection sanity checks, timeouts
pgbouncer |
pgbouncer | # TLS settings
pgbouncer |
pgbouncer | # Dangerous timeouts
pgbouncer |
pgbouncer | Starting pgbouncer.
pgbouncer | 2024-03-06 21:53:06.715 UTC [1] LOG kernel file descriptor limit: 1048576 (hard: 1048576); max_client_conn: 30, max expected fd use: 42
pgbouncer | 2024-03-06 21:53:06.715 UTC [1] LOG listening on 0.0.0.0:6432
pgbouncer | 2024-03-06 21:53:06.715 UTC [1] LOG listening on unix:/tmp/.s.PGSQL.6432
pgbouncer | 2024-03-06 21:53:06.715 UTC [1] LOG process up: PgBouncer 1.15.0, libevent 2.1.8-stable (epoll), adns: c-ares 1.15.0, tls: LibreSSL 2.7.5
nginx | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
nginx | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
nginx | 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
nginx | 10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
nginx | /docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
nginx | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
nginx | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
nginx | /docker-entrypoint.sh: Configuration complete; ready for start up
pgbouncer | 2024-03-06 21:53:08.311 UTC [1] LOG C-0x55aabb9a61b0: (nodb)/(nouser)@192.168.112.5:36598 registered new auto-database: db=postgres
pgbouncer | 2024-03-06 21:53:08.311 UTC [1] LOG C-0x55aabb9a61b0: postgres/[email protected]:36598 login attempt: db=postgres user=postgres tls=no
pgbouncer | 2024-03-06 21:53:08.328 UTC [1] LOG S-0x55aabba07f90: postgres/[email protected]:5432 new connection to server (from 192.168.112.4:44974)
pgbouncer | 2024-03-06 21:53:08.338 UTC [1] LOG C-0x55aabb9a61b0: postgres/[email protected]:36598 closing because: client close request (age=0s)
pgbouncer | 2024-03-06 21:53:08.374 UTC [1] LOG C-0x55aabb9a61b0: postgres/[email protected]:36602 login attempt: db=postgres user=postgres tls=no
pgbouncer | 2024-03-06 21:53:08.375 UTC [1] LOG C-0x55aabb9a61b0: postgres/[email protected]:36602 closing because: client close request (age=0s)
pgbouncer | 2024-03-06 21:53:13.631 UTC [1] LOG C-0x55aabb9a61b0: postgres/[email protected]:46830 login attempt: db=postgres user=postgres tls=no
pgbouncer | 2024-03-06 21:53:13.634 UTC [1] LOG C-0x55aabb9a61b0: postgres/[email protected]:46830 closing because: client close request (age=0s)
pgbouncer | 2024-03-06 21:53:13.716 UTC [1] LOG C-0x55aabb9a61b0: postgres/[email protected]:56616 login attempt: db=postgres user=postgres tls=no
pgbouncer | 2024-03-06 21:53:13.719 UTC [1] LOG C-0x55aabb9a63e0: postgres/[email protected]:46832 login attempt: db=postgres user=postgres tls=no
pgbouncer | 2024-03-06 21:53:13.719 UTC [1] LOG C-0x55aabb9a6610: postgres/[email protected]:56620 login attempt: db=postgres user=postgres tls=no
pgbouncer | 2024-03-06 21:53:13.719 UTC [1] LOG S-0x55aabba081c0: postgres/[email protected]:5432 new connection to server (from 192.168.112.4:48434)
pgbouncer | 2024-03-06 21:53:13.730 UTC [1] LOG C-0x55aabb9a61b0: postgres/[email protected]:56616 closing because: client close request (age=0s)
pgbouncer | 2024-03-06 21:53:13.733 UTC [1] LOG C-0x55aabb9a6610: postgres/[email protected]:56620 closing because: client close request (age=0s)
pgbouncer | 2024-03-06 21:53:13.736 UTC [1] LOG C-0x55aabb9a63e0: postgres/[email protected]:46832 closing because: client close request (age=0s)
pgbouncer | 2024-03-06 21:53:14.315 UTC [1] LOG C-0x55aabb9a63e0: postgres/[email protected]:46848 login attempt: db=postgres user=postgres tls=no
pgbouncer | 2024-03-06 21:53:14.318 UTC [1] LOG C-0x55aabb9a63e0: postgres/[email protected]:46848 closing because: client close request (age=0s)
pgbouncer | 2024-03-06 21:53:14.323 UTC [1] LOG C-0x55aabb9a63e0: postgres/[email protected]:56626 login attempt: db=postgres user=postgres tls=no
pgbouncer | 2024-03-06 21:53:14.328 UTC [1] LOG C-0x55aabb9a63e0: postgres/[email protected]:56626 closing because: client close request (age=0s)
pgbouncer | 2024-03-06 21:53:14.331 UTC [1] LOG C-0x55aabb9a63e0: postgres/[email protected]:56628 login attempt: db=postgres user=postgres tls=no
pgbouncer | 2024-03-06 21:53:14.335 UTC [1] LOG C-0x55aabb9a63e0: postgres/[email protected]:56628 closing because: client close request (age=0s)
pgbouncer | 2024-03-06 21:53:14.425 UTC [1] LOG C-0x55aabb9a63e0: postgres/[email protected]:46862 login attempt: db=postgres user=postgres tls=no
pgbouncer | 2024-03-06 21:53:14.428 UTC [1] LOG C-0x55aabb9a63e0: postgres/[email protected]:46862 closing because: client close request (age=0s)
pgbouncer | 2024-03-06 21:53:15.019 UTC [1] LOG C-0x55aabb9a6610: postgres/[email protected]:46866 login attempt: db=postgres user=postgres tls=no
pgbouncer | 2024-03-06 21:53:15.019 UTC [1] LOG C-0x55aabb9a63e0: postgres/[email protected]:56640 login attempt: db=postgres user=postgres tls=no
pgbouncer | 2024-03-06 21:53:15.024 UTC [1] LOG C-0x55aabb9a61b0: postgres/[email protected]:46870 login attempt: db=postgres user=postgres tls=no
pgbouncer | 2024-03-06 21:53:15.024 UTC [1] LOG S-0x55aabba083f0: postgres/[email protected]:5432 new connection to server (from 192.168.112.4:48446)
pgbouncer | 2024-03-06 21:53:15.031 UTC [1] LOG C-0x55aabb9a6840: postgres/[email protected]:56644 login attempt: db=postgres user=postgres tls=no
pgbouncer | 2024-03-06 21:53:15.032 UTC [1] LOG S-0x55aabba08620: postgres/[email protected]:5432 new connection to server (from 192.168.112.4:48460)
postgres | 2024-03-06 21:53:16.020 GMT [85] ERROR: deadlock detected
postgres | 2024-03-06 21:53:16.020 GMT [85] DETAIL: Process 85 waits for ShareLock on transaction 745; blocked by process 76.
postgres | Process 76 waits for ShareLock on transaction 744; blocked by process 85.
postgres | Process 85:
postgres | INSERT INTO transactions (account_id, amount, description, transaction_type)
postgres | VALUES (1, 1, 'validacao', 'd');
postgres |
postgres | UPDATE accounts
postgres | SET balance = balance - 1
postgres | WHERE accounts.id = 1;
postgres |
postgres | SELECT
postgres | json_build_object(
postgres | 'limite', accounts.limit_amount,
postgres | 'saldo', accounts.balance
postgres | )
postgres | FROM accounts
postgres | WHERE id = 1
postgres | FOR UPDATE
postgres | Process 76:
postgres | INSERT INTO transactions (account_id, amount, description, transaction_type)
postgres | VALUES (1, 1, 'validacao', 'd');
postgres |
postgres | UPDATE accounts
postgres | SET balance = balance - 1
postgres | WHERE accounts.id = 1;
postgres |
postgres | SELECT
postgres | json_build_object(
postgres | 'limite', accounts.limit_amount,
postgres | 'saldo', accounts.balance
postgres | )
postgres | FROM accounts
postgres | WHERE id = 1
postgres | FOR UPDATE
postgres | 2024-03-06 21:53:16.020 GMT [85] HINT: See server log for query details.
postgres | 2024-03-06 21:53:16.020 GMT [85] CONTEXT: while locking tuple (0,14) in relation "accounts"
postgres | 2024-03-06 21:53:16.020 GMT [85] STATEMENT:
postgres | INSERT INTO transactions (account_id, amount, description, transaction_type)
postgres | VALUES (1, 1, 'validacao', 'd');
postgres |
postgres | UPDATE accounts
postgres | SET balance = balance - 1
postgres | WHERE accounts.id = 1;
postgres |
postgres | SELECT
postgres | json_build_object(
postgres | 'limite', accounts.limit_amount,
postgres | 'saldo', accounts.balance
postgres | )
postgres | FROM accounts
postgres | WHERE id = 1
postgres | FOR UPDATE
pgbouncer | 2024-03-06 21:53:16.020 UTC [1] LOG C-0x55aabb9a6610: postgres/[email protected]:46866 closing because: client close request (age=1s)
api1 | ERROR: deadlock detected
api1 | DETAIL: Process 85 waits for ShareLock on transaction 745; blocked by process 76.
api1 | Process 76 waits for ShareLock on transaction 744; blocked by process 85.
api1 | HINT: See server log for query details.
api1 | CONTEXT: while locking tuple (0,14) in relation "accounts"
pgbouncer | 2024-03-06 21:53:16.221 UTC [1] LOG C-0x55aabb9a6610: postgres/[email protected]:46880 login attempt: db=postgres user=postgres tls=no
postgres | 2024-03-06 21:53:17.020 GMT [86] ERROR: deadlock detected
postgres | 2024-03-06 21:53:17.020 GMT [86] DETAIL: Process 86 waits for ShareLock on transaction 745; blocked by process 76.
postgres | Process 76 waits for ShareLock on transaction 746; blocked by process 86.
postgres | Process 86:
postgres | INSERT INTO transactions (account_id, amount, description, transaction_type)
postgres | VALUES (1, 1, 'validacao', 'd');
postgres |
postgres | UPDATE accounts
postgres | SET balance = balance - 1
postgres | WHERE accounts.id = 1;
postgres |
postgres | SELECT
postgres | json_build_object(
postgres | 'limite', accounts.limit_amount,
postgres | 'saldo', accounts.balance
postgres | )
postgres | FROM accounts
postgres | WHERE id = 1
postgres | FOR UPDATE
postgres | Process 76:
postgres | INSERT INTO transactions (account_id, amount, description, transaction_type)
postgres | VALUES (1, 1, 'validacao', 'd');
postgres |
postgres | UPDATE accounts
postgres | SET balance = balance - 1
postgres | WHERE accounts.id = 1;
postgres |
postgres | SELECT
postgres | json_build_object(
postgres | 'limite', accounts.limit_amount,
postgres | 'saldo', accounts.balance
postgres | )
postgres | FROM accounts
postgres | WHERE id = 1
postgres | FOR UPDATE
postgres | 2024-03-06 21:53:17.020 GMT [86] HINT: See server log for query details.
postgres | 2024-03-06 21:53:17.020 GMT [86] CONTEXT: while updating tuple (0,13) in relation "accounts"
postgres | 2024-03-06 21:53:17.020 GMT [86] STATEMENT:
postgres | INSERT INTO transactions (account_id, amount, description, transaction_type)
postgres | VALUES (1, 1, 'validacao', 'd');
postgres |
postgres | UPDATE accounts
postgres | SET balance = balance - 1
postgres | WHERE accounts.id = 1;
postgres |
postgres | SELECT
postgres | json_build_object(
postgres | 'limite', accounts.limit_amount,
postgres | 'saldo', accounts.balance
postgres | )
postgres | FROM accounts
postgres | WHERE id = 1
postgres | FOR UPDATE
pgbouncer | 2024-03-06 21:53:17.021 UTC [1] LOG C-0x55aabb9a61b0: postgres/[email protected]:46870 closing because: client close request (age=1s)
api1 | ERROR: deadlock detected
api1 | DETAIL: Process 86 waits for ShareLock on transaction 745; blocked by process 76.
api1 | Process 76 waits for ShareLock on transaction 746; blocked by process 86.
api1 | HINT: See server log for query details.
api1 | CONTEXT: while updating tuple (0,13) in relation "accounts"
pgbouncer | 2024-03-06 21:53:17.221 UTC [1] LOG C-0x55aabb9a61b0: postgres/[email protected]:46882 login attempt: db=postgres user=postgres tls=no
postgres | 2024-03-06 21:53:18.021 GMT [76] ERROR: deadlock detected
postgres | 2024-03-06 21:53:18.021 GMT [76] DETAIL: Process 76 waits for ShareLock on transaction 747; blocked by process 87.
postgres | Process 87 waits for ShareLock on transaction 745; blocked by process 76.
postgres | Process 76:
postgres | INSERT INTO transactions (account_id, amount, description, transaction_type)
postgres | VALUES (1, 1, 'validacao', 'd');
postgres |
postgres | UPDATE accounts
postgres | SET balance = balance - 1
postgres | WHERE accounts.id = 1;
postgres |
postgres | SELECT
postgres | json_build_object(
postgres | 'limite', accounts.limit_amount,
postgres | 'saldo', accounts.balance
postgres | )
postgres | FROM accounts
postgres | WHERE id = 1
postgres | FOR UPDATE
postgres | Process 87:
postgres | INSERT INTO transactions (account_id, amount, description, transaction_type)
postgres | VALUES (1, 1, 'validacao', 'd');
postgres |
postgres | UPDATE accounts
postgres | SET balance = balance - 1
postgres | WHERE accounts.id = 1;
postgres |
postgres | SELECT
postgres | json_build_object(
postgres | 'limite', accounts.limit_amount,
postgres | 'saldo', accounts.balance
postgres | )
postgres | FROM accounts
postgres | WHERE id = 1
postgres | FOR UPDATE
postgres | 2024-03-06 21:53:18.021 GMT [76] HINT: See server log for query details.
postgres | 2024-03-06 21:53:18.021 GMT [76] CONTEXT: while locking tuple (0,15) in relation "accounts"
postgres | 2024-03-06 21:53:18.021 GMT [76] STATEMENT:
postgres | INSERT INTO transactions (account_id, amount, description, transaction_type)
postgres | VALUES (1, 1, 'validacao', 'd');
postgres |
postgres | UPDATE accounts
postgres | SET balance = balance - 1
postgres | WHERE accounts.id = 1;
postgres |
postgres | SELECT
postgres | json_build_object(
postgres | 'limite', accounts.limit_amount,
postgres | 'saldo', accounts.balance
postgres | )
postgres | FROM accounts
postgres | WHERE id = 1
postgres | FOR UPDATE
api2 | ERROR: deadlock detected
api2 | DETAIL: Process 76 waits for ShareLock on transaction 747; blocked by process 87.
api2 | Process 87 waits for ShareLock on transaction 745; blocked by process 76.
api2 | HINT: See server log for query details.
api2 | CONTEXT: while locking tuple (0,15) in relation "accounts"
pgbouncer | 2024-03-06 21:53:18.021 UTC [1] LOG C-0x55aabb9a63e0: postgres/[email protected]:56640 closing because: client close request (age=3s)
pgbouncer | 2024-03-06 21:53:18.221 UTC [1] LOG C-0x55aabb9a63e0: postgres/[email protected]:56648 login attempt: db=postgres user=postgres tls=no
postgres | 2024-03-06 21:53:19.021 GMT [87] ERROR: deadlock detected
postgres | 2024-03-06 21:53:19.021 GMT [87] DETAIL: Process 87 waits for ShareLock on transaction 749; blocked by process 86.
postgres | Process 86 waits for ShareLock on transaction 747; blocked by process 87.
postgres | Process 87:
postgres | INSERT INTO transactions (account_id, amount, description, transaction_type)
postgres | VALUES (1, 1, 'validacao', 'd');
postgres |
postgres | UPDATE accounts
postgres | SET balance = balance - 1
postgres | WHERE accounts.id = 1;
postgres |
postgres | SELECT
postgres | json_build_object(
postgres | 'limite', accounts.limit_amount,
postgres | 'saldo', accounts.balance
postgres | )
postgres | FROM accounts
postgres | WHERE id = 1
postgres | FOR UPDATE
postgres | Process 86:
postgres | INSERT INTO transactions (account_id, amount, description, transaction_type)
postgres | VALUES (1, 1, 'validacao', 'd');
postgres |
postgres | UPDATE accounts
postgres | SET balance = balance - 1
postgres | WHERE accounts.id = 1;
postgres |
postgres | SELECT
postgres | json_build_object(
postgres | 'limite', accounts.limit_amount,
postgres | 'saldo', accounts.balance
postgres | )
postgres | FROM accounts
postgres | WHERE id = 1
postgres | FOR UPDATE
postgres | 2024-03-06 21:53:19.021 GMT [87] HINT: See server log for query details.
postgres | 2024-03-06 21:53:19.021 GMT [87] CONTEXT: while updating tuple (0,13) in relation "accounts"
postgres | 2024-03-06 21:53:19.021 GMT [87] STATEMENT:
postgres | INSERT INTO transactions (account_id, amount, description, transaction_type)
api2 | ERROR: deadlock detected
api2 | DETAIL: Process 87 waits for ShareLock on transaction 749; blocked by process 86.
api2 | Process 86 waits for ShareLock on transaction 747; blocked by process 87.
api2 | HINT: See server log for query details.
api2 | CONTEXT: while updating tuple (0,13) in relation "accounts"
postgres | VALUES (1, 1, 'validacao', 'd');
postgres |
postgres | UPDATE accounts
postgres | SET balance = balance - 1
postgres | WHERE accounts.id = 1;
postgres |
postgres | SELECT
postgres | json_build_object(
postgres | 'limite', accounts.limit_amount,
postgres | 'saldo', accounts.balance
postgres | )
postgres | FROM accounts
postgres | WHERE id = 1
postgres | FOR UPDATE
pgbouncer | 2024-03-06 21:53:19.022 UTC [1] LOG C-0x55aabb9a6840: postgres/[email protected]:56644 closing because: client close request (age=3s)
pgbouncer | 2024-03-06 21:53:19.222 UTC [1] LOG C-0x55aabb9a6840: postgres/[email protected]:59356 login attempt: db=postgres user=postgres tls=no
postgres | 2024-03-06 21:53:20.021 GMT [86] ERROR: deadlock detected
postgres | 2024-03-06 21:53:20.021 GMT [86] DETAIL: Process 86 waits for ShareLock on transaction 748; blocked by process 85.
postgres | Process 85 waits for ShareLock on transaction 749; blocked by process 86.
postgres | Process 86:
postgres | INSERT INTO transactions (account_id, amount, description, transaction_type)
postgres | VALUES (1, 1, 'validacao', 'd');
postgres |
postgres | UPDATE accounts
postgres | SET balance = balance - 1
postgres | WHERE accounts.id = 1;
postgres |
postgres | SELECT
postgres | json_build_object(
postgres | 'limite', accounts.limit_amount,
postgres | 'saldo', accounts.balance
postgres | )
postgres | FROM accounts
postgres | WHERE id = 1
postgres | FOR UPDATE
postgres | Process 85:
postgres | INSERT INTO transactions (account_id, amount, description, transaction_type)
postgres | VALUES (1, 1, 'validacao', 'd');
postgres |
postgres | UPDATE accounts
postgres | SET balance = balance - 1
postgres | WHERE accounts.id = 1;
postgres |
postgres | SELECT
postgres | json_build_object(
postgres | 'limite', accounts.limit_amount,
postgres | 'saldo', accounts.balance
postgres | )
postgres | FROM accounts
postgres | WHERE id = 1
postgres | FOR UPDATE
postgres | 2024-03-06 21:53:20.021 GMT [86] HINT: See server log for query details.
postgres | 2024-03-06 21:53:20.021 GMT [86] CONTEXT: while locking tuple (0,16) in relation "accounts"
postgres | 2024-03-06 21:53:20.021 GMT [86] STATEMENT:
postgres | INSERT INTO transactions (account_id, amount, description, transaction_type)
postgres | VALUES (1, 1, 'validacao', 'd');
postgres |
postgres | UPDATE accounts
postgres | SET balance = balance - 1
postgres | WHERE accounts.id = 1;
postgres |
postgres | SELECT
postgres | json_build_object(
postgres | 'limite', accounts.limit_amount,
postgres | 'saldo', accounts.balance
postgres | )
postgres | FROM accounts
postgres | WHERE id = 1
postgres | FOR UPDATE
api1 | ERROR: deadlock detected
api1 | DETAIL: Process 86 waits for ShareLock on transaction 748; blocked by process 85.
api1 | Process 85 waits for ShareLock on transaction 749; blocked by process 86.
api1 | HINT: See server log for query details.
api1 | CONTEXT: while locking tuple (0,16) in relation "accounts"
pgbouncer | 2024-03-06 21:53:20.022 UTC [1] LOG C-0x55aabb9a61b0: postgres/[email protected]:46882 closing because: client close request (age=2s)
pgbouncer | 2024-03-06 21:53:20.222 UTC [1] LOG C-0x55aabb9a61b0: postgres/[email protected]:33248 login attempt: db=postgres user=postgres tls=no
postgres | 2024-03-06 21:53:21.022 GMT [85] ERROR: deadlock detected
postgres | 2024-03-06 21:53:21.022 GMT [85] DETAIL: Process 85 waits for ShareLock on transaction 751; blocked by process 87.
postgres | Process 87 waits for ShareLock on transaction 748; blocked by process 85.
postgres | Process 85:
postgres | INSERT INTO transactions (account_id, amount, description, transaction_type)
postgres | VALUES (1, 1, 'validacao', 'd');
postgres |
postgres | UPDATE accounts
postgres | SET balance = balance - 1
postgres | WHERE accounts.id = 1;
postgres |
postgres | SELECT
postgres | json_build_object(
postgres | 'limite', accounts.limit_amount,
postgres | 'saldo', accounts.balance
postgres | )
postgres | FROM accounts
postgres | WHERE id = 1
postgres | FOR UPDATE
postgres | Process 87:
postgres | INSERT INTO transactions (account_id, amount, description, transaction_type)
postgres | VALUES (1, 1, 'validacao', 'd');
postgres |
postgres | UPDATE accounts
postgres | SET balance = balance - 1
postgres | WHERE accounts.id = 1;
postgres |
postgres | SELECT
postgres | json_build_object(
postgres | 'limite', accounts.limit_amount,
postgres | 'saldo', accounts.balance
postgres | )
postgres | FROM accounts
postgres | WHERE id = 1
postgres | FOR UPDATE
postgres | 2024-03-06 21:53:21.022 GMT [85] HINT: See server log for query details.
postgres | 2024-03-06 21:53:21.022 GMT [85] CONTEXT: while updating tuple (0,13) in relation "accounts"
postgres | 2024-03-06 21:53:21.022 GMT [85] STATEMENT:
postgres | INSERT INTO transactions (account_id, amount, description, transaction_type)
postgres | VALUES (1, 1, 'validacao', 'd');
postgres |
postgres | UPDATE accounts
postgres | SET balance = balance - 1
postgres | WHERE accounts.id = 1;
postgres |
postgres | SELECT
postgres | json_build_object(
postgres | 'limite', accounts.limit_amount,
postgres | 'saldo', accounts.balance
postgres | )
postgres | FROM accounts
postgres | WHERE id = 1
postgres | FOR UPDATE
api1 | ERROR: deadlock detected
api1 | DETAIL: Process 85 waits for ShareLock on transaction 751; blocked by process 87.
api1 | Process 87 waits for ShareLock on transaction 748; blocked by process 85.
api1 | HINT: See server log for query details.
api1 | CONTEXT: while updating tuple (0,13) in relation "accounts"
pgbouncer | 2024-03-06 21:53:21.022 UTC [1] LOG C-0x55aabb9a6610: postgres/[email protected]:46880 closing because: client close request (age=4s)
pgbouncer | 2024-03-06 21:53:21.219 UTC [1] LOG C-0x55aabb9a6610: postgres/[email protected]:33258 login attempt: db=postgres user=postgres tls=no
postgres | 2024-03-06 21:53:22.022 GMT [87] ERROR: deadlock detected