Hi, I'm using Rudderstack on Kubernetes cluster, I...
# support
f
Hi, I'm using Rudderstack on Kubernetes cluster, I had to bring down one of my destinations (webhook) for maintenance purpose, so in rudderstack jobsdb a lot of
rt_jobs
tables has been created since it couldn't send events to the destination, now after a day rudder server would be facing this error and it causes crashloop back off:
Copy code
2023-09-01T20:11:08.245Z	INFO	jobsdb.gw	jobsdb/jobsdb.go:2716	[[ gw ]]: Error occurred while updating job statuses. Returning err, pq: out of shared memory
2023-09-01T20:11:08.246Z	ERROR	utils.misc	misc/misc.go:927	updating gateway jobs statuses: pq: out of shared memory
2023-09-01T20:11:08.246Z	ERROR	utils.misc	misc/misc.go:927	goroutine 1792 [running]:
github.com/rudderlabs/rudder-go-kit/logger.(*logger).Fatal(0xc0008caf90, {0xc01bcd09e0?, 0xc00b549788?, 0x1?})
	/go/pkg/mod/github.com/rudderlabs/rudder-go-kit@v0.15.7/logger/logger.go:186 +0x92
github.com/rudderlabs/rudder-server/utils/misc.BugsnagNotify.func1.1()
	/rudder-server/utils/misc/misc.go:927 +0x34d
sync.(*Once).doSlow(0xc01e0f4a01?, 0xc00b5498b0?)
	/usr/local/go/src/sync/once.go:74 +0xc2
sync.(*Once).Do(...)
	/usr/local/go/src/sync/once.go:65
github.com/rudderlabs/rudder-server/utils/misc.BugsnagNotify.func1()
	/rudder-server/utils/misc/misc.go:917 +0xbc
panic({0x2d26f00, 0xc005943440})
	/usr/local/go/src/runtime/panic.go:884 +0x213
github.com/rudderlabs/rudder-server/processor.(*Handle).Store(0xc00076cb00, {0xc002eba080?, 0x1b?}, 0xc001aad180)
	/rudder-server/processor/processor.go:2069 +0xe1b
github.com/rudderlabs/rudder-server/processor.(*worker).start.func4()
	/rudder-server/processor/worker.go:115 +0x2ec
github.com/rudderlabs/rudder-server/rruntime.Go.func1()
	/rudder-server/rruntime/goroutine-factory.go:28 +0x6a
created by github.com/rudderlabs/rudder-server/rruntime.Go
	/rudder-server/rruntime/goroutine-factory.go:25 +0x56
I have enough memory resources, it's about 150 GB free memory on the server.
m
Hey There! 👋 Your message has been received by the RudderStack team. We will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
f
Based on existing solution for this issue, I tried to change the
max_locks_per_transaction
in
postgresql.conf
, this is how I added the configuration to the values.yml
Copy code
postgresql:
  postgresqlConfiguration:
    "maxLocksPerTransaction": "200"
But I think it did not apply to postgres instance, because still I see the old value in the
bitnami/postgresql/data/postgresql.conf
file
#max_locks_per_transaction = 64
jobsdb=# show all;
returns
max_locks_per_transaction |64
h
Can you try updating the configuration directly via connecting to Postgres rather than via helm charts? Not sure if we have support to update all the config variables via helm
f
Hi, even
max_connections
value won't update, I tried different ways but no luck. @helpful-island-54641
And another issue is that I used official image for postgres in values.yml file, but the bitnami postgres image will be deployed. Is that OK?
Config files that I added in
values.yml
are in this path
bitnami/postgresql/conf
of docker image...
h
I am not sure if using the official image works because the location from which the official image looks for config is different from the one where bitnami places the config file
f
Thanks, I changed
max_locks_per_transaction
in the container and it worked
Hi @helpful-island-54641 After a while watching the logs and stats, I realized two servers that had lots of
rt_job
tables because of stopping a destination, are not sending events to destinations, and just received events and lots of restarting for every 2 minutes, even after I changed
max_locks_per_transaction
. This is a real concern for us for keeping up with rudder. Do you have any advice on that?
h
@shy-kite-21035 Can you help set up a call with Javad. We might need to have a look at the rudderstack setup
s
Sure I ll reach out to him for a call
m
Hi @fancy-answer-79663 can you suggest some time when we can setup a call.
f
Hi @shy-kite-21035 I'm free on Monday or Wednesday noon, but I can't show you the case right now, because I deleted rudder postgres since they server were not responding, and it's working fine now.
h
@fancy-answer-79663 I just wanted to have a look at your setup and see if there is anything we could help or optimise with your setup because we have not encountered the issues you have been facing 😅 Completely optional if you are okay and have no issues now
f
Thanks a lot @helpful-island-54641 Yes, I have no issue right now, but I think if
jobsdb
reaches a certain amount of volume (because not responding destination, etc...) It will crash again (I sent the logs earlier in this thread), and also uses high amount of memory in that case...
h
Yeah that is expected as jobsdb is not designed to hold millions of jobs as the system is expected to be real-time
f
It make sense, but is there any technique to keep going in case of having multiple route tables? like split the giant database in 2 pieces and bring up another instance of rudder server with another splitted data? @helpful-island-54641
h
We have some provisions of that sort on enterprise version where we can move date from one instance to another but not in the open source version 😞
😢 1