Ajay
9e3d059d10
Stop postgres retries when over a threshold
2022-10-26 22:58:35 -04:00
Ajay
ee56a8dea4
Last pool fail when timeout
2022-10-26 12:49:39 -04:00
Ajay
94eb37cb1c
Count active postgres and redis requests
2022-10-26 01:31:29 -04:00
Ajay
415bb31e36
Revert "Add concurrent request limit"
2022-10-11 11:59:53 -04:00
Ajay
9386f25f9f
Add read only redis ability
2022-10-09 16:10:46 -04:00
Ajay
f6f83fcbe4
Add concurrent request limit
2022-09-20 23:41:36 -04:00
Ajay
94ca291460
Don't cut off early if last retry
2022-09-11 12:22:57 -04:00
Ajay
1e66a2e57a
Add option to disable fallback after failure
2022-09-08 15:02:56 -04:00
Ajay
ae95f7e3ea
Only give up on replica for last retry
2022-09-07 22:10:48 -04:00
Ajay
bd7dfc63ff
Add eslint rules for dealing with promises
2022-09-07 20:01:11 -04:00
Ajay
cbf352173a
throw error if query fails
2022-08-25 21:14:25 -04:00
Ajay
6be2f96f26
Make max tries configurable
2022-08-20 17:57:40 -04:00
Ajay
47a6a13bdb
Remove unused statement timeout with pgbouncer
2022-08-20 01:56:13 -04:00
Ajay
c3d30b18e2
Increase postgres read timeout and make it configurable
2022-08-15 17:32:07 -04:00
Ajay
be204fe873
Lower postgres read timeout, raise statment timeout
2022-08-12 15:31:19 -04:00
Ajay
da1ed70c66
adjust permissions and use parrallel processing
2022-07-29 11:47:28 -04:00
Ajay
954c3db649
Change postgres timeout values
2022-07-24 15:41:09 -04:00
Ajay
23add072f3
Wait for any successful query instead of just most recent
2022-07-24 15:40:40 -04:00
Ajay
9764c01428
Add timeout for replica requests on non replica too
2022-07-22 20:00:38 -04:00
Ajay
ad7080d801
Force replica if failed using normal
...
alternates now
2022-07-22 19:03:46 -04:00
Ajay
071aae5cf7
Add timeout for write too
2022-07-22 17:31:17 -04:00
Ajay
10491da7c2
Raise timeout
2022-07-22 17:27:32 -04:00
Ajay
b616ac990b
Add statement timeout for read
2022-07-22 16:39:31 -04:00
Ajay
96a75a8335
Add retry logic to postgres requests
...
Maybe solves https://github.com/ajayyy/SponsorBlockServer/issues/487
2022-07-20 14:42:04 -04:00
Ajay
1e441c3ebf
Only use read replica for shorter queries
...
Help with https://github.com/ajayyy/SponsorBlockServer/issues/487
2022-07-20 00:40:07 -04:00
Ajay
f4b66d30ec
Use pool query since this should catch idle errors
...
https://github.com/brianc/node-postgres/issues/1324#issuecomment-623311914
Helps with https://github.com/ajayyy/SponsorBlockServer/issues/487
2022-07-20 00:31:51 -04:00
Ajay
ebee00322a
remove client error listener completely
2022-06-30 18:11:02 -04:00
Ajay
edff48d258
Don't release client on client error
2022-06-30 17:50:15 -04:00
Ajay
3844404637
ctch client connection errors
2022-06-30 02:00:59 -04:00
Ajay
5057c86707
Fix read only db used by default
2022-06-30 01:38:58 -04:00
Ajay
b1b40d410f
Prevent errors from double calling release
2022-06-30 01:37:50 -04:00
Ajay
54db2c8c10
Release client on error
2022-06-27 19:47:29 -04:00
Ajay
86e61c778c
Fix fail calculation
2022-06-25 12:30:16 -04:00
Ajay
e615d7c032
Fix warnings
2022-06-25 12:03:30 -04:00
Ajay
08003bc2f2
Switch postgres instances if there is a failure
2022-06-25 12:02:01 -04:00
Ajay
1a232600a1
Add option to cycle between multiple postgres instances
2022-06-25 01:41:45 -04:00
Ajay
a8d0336cae
Don't crash on postgres errors
2022-06-24 17:20:48 -04:00
Ajay
b0bcf2b684
don't specify tablespace
2022-05-04 16:03:56 -04:00
Ajay
2e4b7a0c9c
Don't force encoding
2022-05-04 15:36:51 -04:00
Ajay Ramachandran
6919b5433b
Add suggested chapter names
2021-11-06 22:43:03 -04:00
Ajay Ramachandran
3873aa61bc
Release client even if an error occurs
...
#372
2021-09-28 09:50:24 -04:00
Ajay Ramachandran
39baa4871a
Merge branch 'master' of https://github.com/ajayyy/SponsorBlockServer
2021-09-27 20:17:24 -04:00
Ajay Ramachandran
9d2c5ed74e
Call connect manually to catch errors
...
Fix #372
2021-09-27 20:17:02 -04:00
Michael C
a028eaa41a
object-curly-spacing
2021-09-22 18:52:35 -04:00
Michael C
1c2dd055c1
Update dependencies & eslint
...
- update API-Docs link
- cast err as string to appease eslint
- update package and bump minimum to fix security issue
- removed unnecessary filters from gitignore
2021-08-27 17:09:31 -04:00
Ajay Ramachandran
f24c962785
Catch postgres exceptions
...
Fix #338
2021-08-10 09:50:32 -04:00
Ajay Ramachandran
3a8076fc3c
Indent switch case
2021-08-02 16:25:04 -04:00
Michael C
b5a29675d6
fix more non-format string-concat
2021-07-12 02:48:49 -04:00
Michael C
c0b1d201ad
fix non-format eslint in src/
2021-07-12 02:12:22 -04:00
Michael C
d89b26b77d
fix eslint-errors
2021-07-04 01:36:03 -04:00