User avatar
Tournesol 🌻 @tournesol@peculiar.florist
3y
How the hell do I know how I should tweak Job concurrency in config ? Is there a limit, should I proportionally augment job limit ?

My instance takes a while to load and I want to first fix that without having to set up another server
​:blob_cat_oh_no:​
⭐3
1
0
0
3
3y
@tournesol Generally, for a small-ish server, I'd do half the amount of CPU cores on your machine
1
0
0
0
User avatar
Tournesol 🌻 @tournesol@peculiar.florist
3y
@kainoa do you mean the number of workers ?
I tried to add workers but got a
Too many clients error
1
0
0
0
3y
@tournesol Yes. Too many clients means you didn't configure PostgreSQL correctly. Go to this website and make a "Data Warehouse" type configuration with at least 200 connections pgtune.leopard.in.ua
1
0
0
0
User avatar
Tournesol 🌻 @tournesol@peculiar.florist
3y
@kainoa I’ve done the changes and restarted postgres but I still get this error :/
Should I see if I have to make a pool for postgres ?Heard about it during my research
​:blobcatgooglyshrug:​

Firefish errors
{"message":"Internal error occurred. Please contact us if the error persists.","code":"INTERNAL_ERROR","id":"5d37dbcb-891e-41ca-a3d6-e690c97775ac","kind":"server"}

and in logs I get this
5|Firefish  | 2023-08-11T01:56:56: error: sorry, too many clients already
5|Firefish  | 2023-08-11T01:56:56:     at Parser.parseErrorMessage (/home/flow/calckey/node_modules/.pnpm/pg-protocol@1.6.0/node_modules/pg-protocol/dist/parser.js:287:98)
5|Firefish  | 2023-08-11T01:56:56:     at Parser.handlePacket (/home/flow/calckey/node_modules/.pnpm/pg-protocol@1.6.0/node_modules/pg-protocol/dist/parser.js:126:29)
5|Firefish  | 2023-08-11T01:56:56:     at Parser.parse (/home/flow/calckey/node_modules/.pnpm/pg-protocol@1.6.0/node_modules/pg-protocol/dist/parser.js:39:38)
5|Firefish  | 2023-08-11T01:56:56:     at Socket.<anonymous> (/home/flow/calckey/node_modules/.pnpm/pg-protocol@1.6.0/node_modules/pg-protocol/dist/index.js:11:42)
5|Firefish  | 2023-08-11T01:56:56:     at Socket.emit (node:events:512:28)
5|Firefish  | 2023-08-11T01:56:56:     at Socket.emit (node:domain:489:12)
5|Firefish  | 2023-08-11T01:56:56:     at addChunk (node:internal/streams/readable:343:12)
5|Firefish  | 2023-08-11T01:56:56:     at readableAddChunk (node:internal/streams/readable:316:9)
5|Firefish  | 2023-08-11T01:56:56:     at Readable.push (node:internal/streams/readable:253:10)
5|Firefish  | 2023-08-11T01:56:56:     at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
5|Firefish  | 2023-08-11T01:56:56:   length: 85,
5|Firefish  | 2023-08-11T01:56:56:   severity: 'FATAL',
5|Firefish  | 2023-08-11T01:56:56:   code: '53300',
5|Firefish  | 2023-08-11T01:56:56:   detail: undefined,
5|Firefish  | 2023-08-11T01:56:56:   hint: undefined,
5|Firefish  | 2023-08-11T01:56:56:   position: undefined,
5|Firefish  | 2023-08-11T01:56:56:   internalPosition: undefined,
5|Firefish  | 2023-08-11T01:56:56:   internalQuery: undefined,
5|Firefish  | 2023-08-11T01:56:56:   where: undefined,
5|Firefish  | 2023-08-11T01:56:56:   schema: undefined,
5|Firefish  | 2023-08-11T01:56:56:   table: undefined,
5|Firefish  | 2023-08-11T01:56:56:   column: undefined,
5|Firefish  | 2023-08-11T01:56:56:   dataType: undefined,
5|Firefish  | 2023-08-11T01:56:56:   constraint: undefined,
5|Firefish  | 2023-08-11T01:56:56:   file: 'proc.c',
5|Firefish  | 2023-08-11T01:56:56:   line: '357',
5|Firefish  | 2023-08-11T01:56:56:   routine: 'InitProcess'
5|Firefish  | 2023-08-11T01:56:56: }
1
0
0
0
3y
@tournesol
error: sorry, too many clients already
That still means there's not enough connections for Postgres. Did you make sure to restart Postgres after making the changes?
1
0
0
0
User avatar
Tournesol 🌻 @tournesol@peculiar.florist
3y
@kainoa yeah, restarted the whole server as well. 200 connections
😮1
1
0
0
1
3y
@tournesol Yeah, that means you may need to increase the number of connections further, and possibly install a monitor/pooler
1
0
0
0
User avatar
Tournesol 🌻 @tournesol@peculiar.florist
3y
@kainoa Okay thank you ! I’ll try to dig deeper into this direction. At least I know I’m going into the right direction ! Thank you !

I will stop annoying you and I get back to you when I’ll succeed πŸ’ͺ
Again, thank you very much for your time
​:blob_cat_heart:​
1
0
0
0
User avatar
Tournesol 🌻 @tournesol@peculiar.florist
3y
@kainoa yeah so … the number of connections wasn’t set properly, now it’s working fine !
Thanks ! Hope I’ll see some improvements
​:crumbdance:​
:iwibunhyperwubbel@firefish.social:1
0
0
0
1