Hi, I get this error on rudder server and causes t...
# support
f
Hi, I get this error on rudder server and causes the server to crash.
RSERVER_JOBS_DB_QUERY_REQUEST_TIMEOUT= 600s
has been set. rudder server version: 1.11.2 postgres version: 13-bullseye
Copy code
2023-07-16T11:18:21.668Z	ERROR	jobsdb.batch_rt	jobsdb/migration.go:44	Failed to migrate ds: could not acquire a dslist read lock: context deadline exceeded
2023-07-22T10:25:56.000Z	ERROR	utils.misc	misc/misc.go:1127	goroutine 1026 [running]:
github.com/rudderlabs/rudder-go-kit/logger.(*logger).Fatal(0xc0002eef00, {0xc001fd9fd0?, 0xc00228fc08?, 0x1?})
	/go/pkg/mod/github.com/rudderlabs/rudder-go-kit@v0.15.0/logger/logger.go:186 +0x92
github.com/rudderlabs/rudder-server/utils/misc.BugsnagNotify.func1.1()
	/rudder-server/utils/misc/misc.go:1127 +0x34d
sync.(*Once).doSlow(0x3a0b9e8?, 0xc0025fa3c0?)
	/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:1117 +0xbc
panic({0x2d6b220, 0xc000118260})
	/usr/local/go/src/runtime/panic.go:884 +0x213
github.com/rudderlabs/rudder-server/jobsdb.(*HandleT).migrateDSLoop(0xc0019b8000, {0x3a0b9e8, 0xc0025fa3c0})
	/rudder-server/jobsdb/migration.go:52 +0x211
github.com/rudderlabs/rudder-server/jobsdb.(*HandleT).startMigrateDSLoop.func1()
	/rudder-server/jobsdb/migration.go:26 +0x25
github.com/rudderlabs/rudder-server/utils/misc.WithBugsnag.func1()
	/rudder-server/utils/misc/misc.go:1138 +0x70
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/go/pkg/mod/golang.org/x/sync@v0.3.0/errgroup/errgroup.go:75 +0x64
created by golang.org/x/sync/errgroup.(*Group).Go
	/go/pkg/mod/golang.org/x/sync@v0.3.0/errgroup/errgroup.go:72 +0xa5

2023/07/22 10:25:56 notifying bugsnag: failed to migrate ds: could not acquire a dslist read lock: context deadline exceeded
2023/07/22 10:25:56 bugsnag.Notify: bugsnag/payload.deliver: invalid api key: ''
2023/07/22 10:25:56 bugsnag/sessions/publisher.publish invalid API key: ''
panic: failed to migrate ds: could not acquire a dslist read lock: context deadline exceeded [recovered]
	panic: failed to migrate ds: could not acquire a dslist read lock: context deadline exceeded [recovered]
	panic: failed to migrate ds: could not acquire a dslist read lock: context deadline exceeded
m
Hey There! 👋 Your message has been received by the RudderStack team. Our standard customer support hours are 9-6 PM EST, but 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
Hi @narrow-rain-89253, can you help me in this? our data are not getting transferred to any destination.
m
Hey Hi @fancy-answer-79663
I see that you triggered a P0 on this. Let me check if someone on the team is available.
This seems to be one of the newer server versions. Can you down-migrate to an older version https://hub.docker.com/r/rudderlabs/rudder-server/tags?page=1&ordering=last_updated
f
Hi @shy-kite-21035 thanks for your reply, is it OK to downgrade to 1.9.0?
m
Yes. There seems to be a similar issue that was fixed in 1.9.0. You can try that for now and I will update you once the team confirms.
🙌 1
f
yep, it fixed the issue, thanks a lot man, you're life saver 🙏
m
Good. Thanks for the update.
f
Hi, @shy-kite-21035 Can you give me some details about this issue please, I'm still seeing this time to time...
Copy code
2023-07-24T14:58:09.168Z	WARN	router	router/router.go:234	Timeout during query jobs in router module, attempt 3
2023-07-24T14:58:09.169Z	ERROR	utils.misc	misc/misc.go:1158	could not acquire a dslist read lock: context deadline exceeded
2023-07-24T14:58:09.169Z	ERROR	utils.misc	misc/misc.go:1158	goroutine 56792 [running]:
github.com/rudderlabs/rudder-go-kit/logger.(*logger).Fatal(0xc0014985d0, {0xc06ddbf540?, 0xc004ebf498?, 0x1?})
	/go/pkg/mod/github.com/rudderlabs/rudder-go-kit@v0.13.0/logger/logger.go:186 +0x92
github.com/rudderlabs/rudder-server/utils/misc.BugsnagNotify.func1.1()
	/rudder-server/utils/misc/misc.go:1158 +0x34d
sync.(*Once).doSlow(0x0?, 0x352c300?)
	/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:1148 +0xbc
panic({0x295ddc0, 0xc03644a700})
	/usr/local/go/src/runtime/panic.go:884 +0x213
github.com/rudderlabs/rudder-server/router/internal/jobiterator.(*Iterator).HasNext(0xc000448ea0)
	/rudder-server/router/internal/jobiterator/jobiterator.go:134 +0x3ce
github.com/rudderlabs/rudder-server/router.(*HandleT).readAndProcess(0xc006e18900)
	/rudder-server/router/router.go:803 +0x3c6
github.com/rudderlabs/rudder-server/router.(*HandleT).generatorLoop(0xc006e18900, {0x354a288, 0xc0013f7b80})
	/rudder-server/router/router.go:729 +0x22d
github.com/rudderlabs/rudder-server/router.(*HandleT).Start.func1()
	/rudder-server/router/router.go:1055 +0x1ce
github.com/rudderlabs/rudder-server/utils/misc.WithBugsnag.func1()
	/rudder-server/utils/misc/misc.go:1169 +0x70
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/go/pkg/mod/golang.org/x/sync@v0.1.0/errgroup/errgroup.go:75 +0x64
created by golang.org/x/sync/errgroup.(*Group).Go
	/go/pkg/mod/golang.org/x/sync@v0.1.0/errgroup/errgroup.go:72 +0xa5

2023/07/24 14:58:09 notifying bugsnag: could not acquire a dslist read lock: context deadline exceeded
2023/07/24 14:58:09 bugsnag.Notify: bugsnag/payload.deliver: invalid api key: ''
2023/07/24 14:58:09 bugsnag/sessions/publisher.publish invalid API key: ''
panic: could not acquire a dslist read lock: context deadline exceeded [recovered]
	panic: could not acquire a dslist read lock: context deadline exceeded [recovered]
	panic: could not acquire a dslist read lock: context deadline exceeded

goroutine 56792 [running]:
github.com/bugsnag/bugsnag-go/v2.AutoNotify({0xc004ebf2a8, 0x3, 0xc000100000?})
	/go/pkg/mod/github.com/bugsnag/bugsnag-go/v2@v2.2.0/bugsnag.go:112 +0x3ec
panic({0x295ddc0, 0xc03644a700})
	/usr/local/go/src/runtime/panic.go:884 +0x213
github.com/rudderlabs/rudder-server/utils/misc.BugsnagNotify.func1.1()
	/rudder-server/utils/misc/misc.go:1159 +0x35c
sync.(*Once).doSlow(0x0?, 0x352c300?)
	/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:1148 +0xbc
panic({0x295ddc0, 0xc03644a700})
	/usr/local/go/src/runtime/panic.go:884 +0x213
github.com/rudderlabs/rudder-server/router/internal/jobiterator.(*Iterator).HasNext(0xc000448ea0)
	/rudder-server/router/internal/jobiterator/jobiterator.go:134 +0x3ce
github.com/rudderlabs/rudder-server/router.(*HandleT).readAndProcess(0xc006e18900)
	/rudder-server/router/router.go:803 +0x3c6
github.com/rudderlabs/rudder-server/router.(*HandleT).generatorLoop(0xc006e18900, {0x354a288, 0xc0013f7b80})
	/rudder-server/router/router.go:729 +0x22d
github.com/rudderlabs/rudder-server/router.(*HandleT).Start.func1()
	/rudder-server/router/router.go:1055 +0x1ce
github.com/rudderlabs/rudder-server/utils/misc.WithBugsnag.func1()
	/rudder-server/utils/misc/misc.go:1169 +0x70
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/go/pkg/mod/golang.org/x/sync@v0.1.0/errgroup/errgroup.go:75 +0x64
created by golang.org/x/sync/errgroup.(*Group).Go
	/go/pkg/mod/golang.org/x/sync@v0.1.0/errgroup/errgroup.go:72 +0xa5
m
Sure checking up with the team on this
🙏 1
Can you run this command on your postgres instance
Copy code
VACUUM FULL
f
I did vacuum but still get the same error
I also have this warning
Timeout during query jobs in router module, attempt 1
m
Following up on this with the team
🙏 1
s
@fancy-answer-79663, what are the resources of the Postgres pod that you are allotting?
f
@shy-kite-21035 Thanks, I increased memory of postgres pods to about 45 GB, still facing error and even sometimes it consume higher memory , but data transferring rate increased. 2 nodes with older data (about last 3 or 4 days) are consuming a lot of memory but the other 2 nodes are using fair memory
s
Oh ok. Will update the team
f
image.png
image.png
Copy code
2023-07-27T11:25:26.897Z	ERROR	jobsdb.rt	jobsdb/migration.go:44	Failed to migrate ds: could not acquire a dslist read lock: context deadline exceeded
d2023/07/27 11:25:50 bugsnag/sessions/publisher.publish invalid API key: ''
2023/07/27 11:26:50 bugsnag/sessions/publisher.publish invalid API key: ''
2023/07/27 11:27:50 bugsnag/sessions/publisher.publish invalid API key: ''
2023-07-27T11:27:56.900Z	ERROR	jobsdb.rt	jobsdb/migration.go:44	Failed to migrate ds: could not acquire a dslist read lock: context deadline exceeded
2023/07/27 11:28:50 bugsnag/sessions/publisher.publish invalid API key: ''
2023/07/27 11:29:50 bugsnag/sessions/publisher.publish invalid API key: ''
2023-07-27T11:30:26.902Z	ERROR	jobsdb.rt	jobsdb/migration.go:44	Failed to migrate ds: could not acquire a dslist read lock: context deadline exceeded
2023/07/27 11:30:50 bugsnag/sessions/publisher.publish invalid API key: ''
2023/07/27 11:31:50 bugsnag/sessions/publisher.publish invalid API key: ''
2023/07/27 11:32:50 bugsnag/sessions/publisher.publish invalid API key: ''
2023-07-27T11:32:56.904Z	ERROR	jobsdb.rt	jobsdb/migration.go:44	Failed to migrate ds: could not acquire a dslist read lock: context deadline exceeded
2023-07-27T11:32:56.938Z	WARN	services.multiTenant	multitenant/tenantstats.go:100	Timeout during query jobs in multitenant module, attempt 1
2023/07/27 11:33:50 bugsnag/sessions/publisher.publish invalid API key: ''
m
You seem to be still facing the error.
Can you set this RSERVER_JOBS_DB_DS_LIMIT=10. This should reduce the load on the DB a little.
f
I added this config to but nothing changed, still the same error and same resource usage...
Thanks, it seems the error has gone, I'll update you in couple of hours...
m
Hey Javad let me know if you face the issue again, I will hand over the conversation directly to the dev team.
f
thank you, in one node I didn't see any error and it didn't crash anymore, but the another one it sometimes crashes and error is still there, I will update if anything happened, thanks a lot
Hi @shy-kite-21035 I faced the issue again... 3 nodes out of the 4 do not having migration of events and transferring events to destinations does not occurs...
Copy code
3-08-18T00:57:38.390Z        WARN    processor       processor/processor.go:2804     Timeout during GetPileUpCounts, attempt 1
2023-08-18T00:58:08.061Z        ERROR   utils.misc      misc/misc.go:928        failed to migrate ds: pq: canceling statement due to user reque
st; driver: bad connection
2023-08-18T00:58:08.061Z        ERROR   utils.misc      misc/misc.go:928        goroutine 1078 [running]:
github.com/rudderlabs/rudder-go-kit/logger.(*logger).Fatal(0xc000a78f90, {0xc0006e34d0?, 0xc001775c08?, 0x1?})
        /go/pkg/mod/github.com/rudderlabs/rudder-go-kit@v0.15.5/logger/logger.go:186 +0x92
github.com/rudderlabs/rudder-server/utils/misc.BugsnagNotify.func1.1()
        /rudder-server/utils/misc/misc.go:928 +0x34d
sync.(*Once).doSlow(0x39bad68?, 0xc00213f4a0?)
        /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:918 +0xbc
panic({0x2d1bdc0, 0xc0005e6ec0})
        /usr/local/go/src/runtime/panic.go:884 +0x213
github.com/rudderlabs/rudder-server/jobsdb.(*HandleT).migrateDSLoop(0xc0018ceb40, {0x39bad68, 0xc00213f4a0})
        /rudder-server/jobsdb/migration.go:53 +0x211
github.com/rudderlabs/rudder-server/jobsdb.(*HandleT).startMigrateDSLoop.func1()
        /rudder-server/jobsdb/migration.go:27 +0x25
github.com/rudderlabs/rudder-server/utils/misc.WithBugsnag.func1()
        /rudder-server/utils/misc/misc.go:939 +0x70
golang.org/x/sync/errgroup.(*Group).Go.func1()
        /go/pkg/mod/golang.org/x/sync@v0.3.0/errgroup/errgroup.go:75 +0x64
created by golang.org/x/sync/errgroup.(*Group).Go
        /go/pkg/mod/golang.org/x/sync@v0.3.0/errgroup/errgroup.go:72 +0xa5

2023/08/18 00:58:08 notifying bugsnag: failed to migrate ds: pq: canceling statement due to user request; driver: bad connection
2023/08/18 00:58:08 bugsnag.Notify: bugsnag/payload.deliver: invalid api key: ''
2023/08/18 00:58:08 bugsnag/sessions/publisher.publish invalid API key: ''
panic: failed to migrate ds: pq: canceling statement due to user request; driver: bad connection [recovered]
        panic: failed to migrate ds: pq: canceling statement due to user request; driver: bad connection [recovered]
        panic: failed to migrate ds: pq: canceling statement due to user request; driver: bad connection
I changed rudder-server version to 1-alpine, and this error fired
Copy code
2023-08-18T08:55:15.221Z	INFO	warehouse.archiver	archive/cron.go:12	context is cancelled, stopped running archiving
2023-08-18T08:55:15.221Z	INFO	warehouse.POSTGRES	warehouse/router_tracker.go:42	context is cancelled, stopped running tracking
2023-08-18T08:55:15.221Z	INFO	asyncjob	jobs/runner.go:167	[WH-Jobs]: Stopping AsyncJobRunner
2023-08-18T08:55:15.221Z	ERROR	warehouse.pgnotifier	pgnotifier/pgnotifier.go:665	Error while unlocking maintenance worker lock: driver: bad connection
2023-08-18T08:55:15.222Z	WARN	admin	admin/admin.go:162	close unix /data/rudderstack/rudder-server.sock: use of closed network connection
2023/08/18 08:55:16 bugsnag/sessions/publisher.publish invalid API key: ''
2023-08-18T08:55:30.222Z	ERROR	runner	runner/runner.go:308	Graceful termination failed after 15.000484507s, goroutine dump:



goroutine profile: total 543
256 @ 0x43c156 0x406fbd 0x406af8 0x1504725 0x150427d 0xc21610 0x8cf884 0x470c61
#	0x1504724	github.com/rudderlabs/rudder-server/gateway.(*Handle).dbWriterWorkerProcess+0x64	/rudder-server/gateway/handle_lifecycle.go:313
#	0x150427c	github.com/rudderlabs/rudder-server/gateway.(*Handle).initDBWriterWorkers.func1+0x1c	/rudder-server/gateway/handle_lifecycle.go:263
#	0xc2160f	github.com/rudderlabs/rudder-server/utils/misc.WithBugsnag.func1+0x6f			/rudder-server/utils/misc/misc.go:939
#	0x8cf883	golang.org/x/sync/errgroup.(*Group).Go.func1+0x63					/go/pkg/mod/golang.org/x/sync@v0.3.0/errgroup/errgroup.go:75

64 @ 0x43c156 0x406fbd 0x406af8 0x14c4a26 0x14c2b39 0xc21610 0x8cf884 0x470c61
#	0x14c4a25	github.com/rudderlabs/rudder-server/gateway/webhook.(*batchWebhookTransformerT).batchTransformLoop+0x65	/rudder-server/gateway/webhook/webhook.go:318
#	0x14c2b38	github.com/rudderlabs/rudder-server/gateway/webhook.Setup.func1+0xd8					/rudder-server/gateway/webhook/setup.go:70
#	0xc2160f	github.com/rudderlabs/rudder-server/utils/misc.WithBugsnag.func1+0x6f					/rudder-server/utils/misc/misc.go:939
#	0x8cf883	golang.org/x/sync/errgroup.(*Group).Go.func1+0x63							/go/pkg/mod/golang.org/x/sync@v0.3.0/errgroup/errgroup.go:75

64 @ 0x43c156 0x406fbd 0x406af8 0x14f904b 0x15040c5 0x8cf884 0x470c61
#	0x14f904a	github.com/rudderlabs/rudder-server/gateway.(*Handle).userWebRequestWorkerProcess+0x6a		/rudder-server/gateway/handle.go:184
#	0x15040c4	github.com/rudderlabs/rudder-server/gateway.(*Handle).runUserWebRequestWorkers.func1+0x24	/rudder-server/gateway/handle_lifecycle.go:243
#	0x8cf883	golang.org/x/sync/errgroup.(*Group).Go.func1+0x63						/go/pkg/mod/golang.org/x/sync@v0.3.0/errgroup/errgroup.go:75
Based on my previous experiences deleting
jobsdb
database would solve the problem, but It's not an option for me because of losing data and it will come back again...
m
Hi Javad, looping in the team on this.
🙏 1
f
Hi@shy-kite-21035 Any update on this?
m
Nope, following up with the team on this.
🙏 1
f
kindly reminder @shy-kite-21035
h
Hey @fancy-answer-79663 Is this resulting in a crashloop back off or a one time panic?
We haven’t seen this happen on our production environments so can you also please mention the postgres resources and configuration?
f
Hi @helpful-island-54641 It's resulting in a crashloop back off and events don't reach to the destinations at all! I removed postgres pod resource limit, I have 2 rudder server instance on kubernetes, one of them does not do any migration of events to destination. We're using postgres version
13.11-bullseye
and didn't change it's default configuration. this healthy postgres memory usage.
It's worth adding that our events rate are high.
h
Using 140GB of memory for a rudder server is not expected. How many replicas are you running? And are all the replicas returning similar stats?
f
yes, it's pretty high, it was 4 replica, but because of this issue we scaled down to 2, now one of these two nodes having same issue and just one of the replica is working fine @helpful-island-54641
The error logs:
Copy code
2023-08-25T19:15:16.891Z	INFO	jobsdb.gw	jobsdb/jobsdb.go:1136	[JobsDB] gw_jobs_2730 is full in size. Count: 34705, Size: 300556288
2023-08-25T19:15:16.893Z	INFO	jobsdb.gw	jobsdb/jobsdb.go:2504	[[ gw : addNewDSLoop ]]: NewDS
2023-08-25T19:15:16.894Z	INFO	jobsdb.gw	jobsdb/jobsdb.go:1219	Creating new DS {JobTable:gw_jobs_2731 JobStatusTable:gw_job_status_2731 Index:2731}
2023-08-25T19:15:26.330Z	ERROR	jobsdb.rt	jobsdb/migration.go:44	Failed to migrate ds: could not acquire a dslist read lock: context deadline exceeded
2023-08-25T19:17:56.331Z	ERROR	jobsdb.rt	jobsdb/migration.go:44	Failed to migrate ds: could not acquire a dslist read lock: context deadline exceeded
023-08-25T19:20:26.336Z	ERROR	jobsdb.rt	jobsdb/migration.go:44	Failed to migrate ds: could not acquire a dslist read lock: context deadline exceeded
2023-08-25T19:20:26.833Z	WARN	services.multiTenant	multitenant/tenantstats.go:100	Timeout during query jobs in multitenant module, attempt 2
2023-08-25T19:20:26.834Z	ERROR	cluster	cluster/dynamic.go:257	Failed to start the server: multi tenant stat start: pq: canceling statement due to user request
2023-08-25T19:20:26.834Z	ERROR	cluster	cluster/dynamic.go:124	failed to start the server: multi tenant stat start: pq: canceling statement due to user request
2023-08-25T19:20:26.873Z	INFO	asyncjob	jobs/runner.go:171	[WH-Jobs]: Stopping AsyncJobRunner
2023-08-25T19:20:26.875Z	INFO	warehouse	warehouse/tracker.go:42	context is cancelled, stopped running tracking
2023-08-25T19:20:26.876Z	WARN	admin	admin/admin.go:162	close unix /data/rudderstack/rudder-server.sock: use of closed network connection
2023-08-25T19:20:26.873Z	INFO	warehouse.archiver	archive/cron.go:12	context is cancelled, stopped running archiving
2023-08-25T19:20:26.879Z	ERROR	warehouse.pgnotifier	pgnotifier/pgnotifier.go:657	Error while unlocking maintenance worker lock: driver: bad connection
2023-08-25T19:20:26.879Z	ERROR	runner	runner/runner.go:278	Terminal error: rudder core: failed to start the server: multi tenant stat start: pq: canceling statement due to user request
2023-08-25T19:20:26.879Z	INFO	runner	runner/runner.go:281	Attempting to shutdown gracefully
2023-08-25T19:20:26.879Z	INFO	runner	runner/runner.go:292	Graceful terminal after 5.493781ms, with 51 go-routines
h
Can you connect to postgres and see how many pending tables do you have right now?
Also, temporarily, can you try increasing the
RSERVER_JOBS_DB_QUERY_REQUEST_TIMEOUT
value to a higher number? Probably 1800s? Hoping this would solve the crash loop issue for now?
f
I have lots of rt_job_status and rt_jobs tables, if it's what you mean by pending tables,
RSERVER_JOBS_DB_QUERY_REQUEST_TIMEOUT
was 600s and I changed it to 1800s.
h
I think the problem here is having lots of rt tables.. the query that is timing out is also one that has no impact on the application but just for stat. Let me try to get you a custom dev build to resolve it
🙏 1
What’s the server version you are on?
1.9
?
f
Yes, I'm using
1.9.0
version
@helpful-island-54641
h
I made a custom build.. give me 5-6mins for the CI to run and you can deploy it and check it out
f
Thanks a lot 🙏
h
Copy code
rudderlabs/develop-rudder-server:chore.OSSBranch
Can you try out this image?
f
@helpful-island-54641 I tried this and have this error
Copy code
2023-08-26T06:27:51.179Z	INFO	router.customdestinationmanager	customdestinationmanager/customdestinationmanager.go:278	[CDM KAFKA] DestID: 2U4H4s6XXlZgH6RF7c1uIboI900, Created new client
2023-08-26T06:27:51.179Z	INFO	router.customdestinationmanager	customdestinationmanager/customdestinationmanager.go:278	[CDM KAFKA] DestID: 2U7NpRnQRv2WaMHyvHPTscVj1Rc, Created new client
2023-08-26T06:27:51.343Z	INFO	jobsdb.rt	jobsdb/jobsdb.go:2361	[[ rt : addNewDSLoop ]]: NewDS
2023-08-26T06:27:51.343Z	INFO	jobsdb.rt	jobsdb/jobsdb.go:1300	Creating new DS {JobTable:rt_jobs_10208 JobStatusTable:rt_job_status_10208 Index:10208}
2023-08-26T06:27:57.861Z	INFO	processor.worker-pool	workerpool/worker_pool.go:96	shutting down worker pool
2023-08-26T06:27:57.864Z	ERROR	utils.misc	misc/misc.go:927	storing batch router jobs: pq: out of shared memory
2023-08-26T06:27:57.864Z	ERROR	utils.misc	misc/misc.go:927	goroutine 1739 [running]:
github.com/rudderlabs/rudder-go-kit/logger.(*logger).Fatal(0xc00095cf90, {0xc04414b710?, 0xc03726f788?, 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(0xc027b7a901?, 0xc03726f8b0?)
	/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, 0xc00418c380})
	/usr/local/go/src/runtime/panic.go:884 +0x213
github.com/rudderlabs/rudder-server/processor.(*Handle).Store(0xc001504000, {0xc002b641c0?, 0x1b?}, 0xc0011a9260)
	/rudder-server/processor/processor.go:1969 +0x103a
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

2023/08/26 06:27:57 notifying bugsnag: storing batch router jobs: pq: out of shared memory
2023/08/26 06:27:57 bugsnag.Notify: bugsnag/payload.deliver: invalid api key: ''
2023/08/26 06:27:57 bugsnag/sessions/publisher.publish invalid API key: ''
panic: storing batch router jobs: pq: out of shared memory [recovered]
	panic: storing batch router jobs: pq: out of shared memory [recovered]
	panic: storing batch router jobs: pq: out of shared memory
h
I think your server is overloaded. Can you try and ensure that the overloaded server doesn’t receive any traffic? We can just look to drain jobs from that
f
@helpful-island-54641 Any idea how to do that?
h
It would depend on how are you routing your requests 😕 If you are using the Kubernetes service to route the requests I guess there is no easy way to do this. In this case the better option would be to delete the PVC attached to the Postgres and then attach the PVC to a new rudder server deployment which would not receive any traffic Another way I can think of is on similar lines… take a pg_dump and delete all the tables on this database , restore them onto a new empty rudder server and let it process
f
Thanks, yep, I'm using Kubernetes, I deleted the tables, let me see if there will be many rt table again or no...
Hi @helpful-island-54641 After 8 hours we have 140 arc_jobs tables, is it normal?
h
no it isn’t… arc jobs tables are just meant for backup and not for any processing. They could be dropped but was wondering if you could share your logs for me to understand if there was an issue in backing them up
f
rudderstack.logs
And this instance used 65 GB storage and uses 25 GB of memory
h
Copy code
2023-08-27T05:47:39.393Z	ERROR	archiver.worker	archiver/worker.go:109	failed to upload jobs	{"sourceID": "23BC19vWtVeVyvVRWFqKl6Qy5ux", "workspaceID": "1mLIr5TVziGwKhnvQ1OxQkZHWyH", "error": "upload file to object storage - checking bucket: Bucket name contains invalid characters"}
I see this error from the logs
f
Does this related to
JOBS_BACKUP_BUCKET
var?
http://xxxx:9000/rudder-jobs-backup
this is the value of
JOBS_BACKUP_BUCKET
var @helpful-island-54641
h
Yeah, this is the variable where the backup is failing. Is this probably a MINIO instance?
You can also set
RSERVER_ARCHIVAL_ENABLED
to false if you do not need the jobs backed up
f
Yes, it's a MINIO instance, I disabled archiving, gonna update you, thanks
h
I guess for MINIO the url isn’t required as part of bucket name but I am not 100% sure of that
f
I set
RSERVER_ARCHIVAL_ENABLED
to false, and commented
JOBS_BACKUP
variables, but this error has raised
Copy code
2023-08-27T14:16:14.746Z	ERROR	archiver.worker	archiver/worker.go:109	failed to upload jobs	{"sourceID": "2KjJyzlOnaLEmTotYW7hzosgVsj", "workspaceID": "1mLIr5TVziGwKhnvQ1OxQkZHWyH", "error": "upload file to object storage - InvalidAccessKeyId: The AWS Access Key Id you provided does not exist in our records.\n\tstatus code: 403, request id: FR8Q3KWM1F2CTFAB, host id: sjWu+VqPI+T4tS+0lce0x3pNCmiLPWsmd5OELJSzVNkx9VIo7SqOMl4sLXu5uomFSy0LZsigPX3kWcPtCv5ORTNt2hXvtY8efC1l94spXDI="}
h
You can drop the tables too… new tables will not get added
f
I think I set this without url but it was looking for localhost for MINIO instance, I'm not sure either...
but is it okay that above error still shows up?
@helpful-island-54641
Copy code
2023-08-27T14:21:20.943Z	ERROR	archiver.worker	archiver/worker.go:109	failed to upload jobs	{"sourceID": "2KjJyzlOnaLEmTotYW7hzosgVsj", "workspaceID": "1mLIr5TVziGwKhnvQ1OxQkZHWyH", "error": "upload file to object storage - NoCredentialProviders: no valid providers in chain\ncaused by: EnvAccessKeyNotFound: failed to find credentials in the environment.\nSharedCredsLoad: failed to load profile, .\nEC2RoleRequestError: no EC2 instance role found\ncaused by: RequestError: send request failed\ncaused by: Get \"http://169.254.169.254/latest/meta-data/iam/security-credentials/\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"}
h
This is happening even after dropping all the tables and setting the env?
f
Yes, this my envs in values file @helpful-island-54641
Copy code
extraEnvVars:
    - name: CONFIG_BACKEND_URL
      value: "https://api.rudderlabs.com"
    - name: CONFIG_PATH
      value: "/etc/rudderstack/config.yaml"
    # These credentials are used for backing up successfully processed events
    #- name: AWS_ACCESS_KEY_ID
    #value: "Smaug"
    #- name: AWS_SECRET_ACCESS_KEY
    #value: "Arkenstone"
      #- name: BUGSNAG_KEY
      #value: "51cc5b26fd2407ca2e9713fc1a0e28e8"
    - name: RUDDER_TMPDIR
      value: "/data/rudderstack"
      #- name: JOBS_BACKUP_STORAGE_PROVIDER
      #value: "MINIO" # object storage provider to store backups eg. S3, GCS, AZURE_BLOB, MINIO
      #- name: JOBS_BACKUP_BUCKET
      #value: "http://192.168.201.238:9000/rudder-jobs-backup"
      #- name: JOB_STATUS_BACKUP_BUCKET
      #value: "Add your bucket name to store backups of status of incoming events"
    - name: GOOGLE_APPLICATION_CREDENTIALS
      value: "/etc/rudderstack/google-application-credentials.json"
    - name: LOG_LEVEL
      value: "INFO" # eg. DEBUG, ERROR
    - name: RSERVER_PROCESSOR_FIXED_LOOP_SLEEP_IN_MS
      value: "2000"
    - name: RSERVER_ROUTER_FIXED_LOOP_SLEEP_IN_MS
      value: "3000"
    - name: RSERVER_JOBS_DB_QUERY_REQUEST_TIMEOUT
      value: "1800s"
    - name: RSERVER_JOBS_DB_BACKUP_ENABLED
      value: "false"
    - name: RSERVER_JOBS_DB_DS_LIMIT
      value: "10"
    - name: RSERVER_ROUTER_GUARANTEE_USER_EVENT_ORDER
      value: "false"
    - name: RSERVER_ARCHIVAL_ENABLED
      value: "false"
After deleting
jobs_arc_11
rudder server faced error and stopped
Copy code
2023/08/27 15:00:18 notifying bugsnag: [[ arc ]]: dnum 11 is not found in jobStatusNameMap
2023/08/27 15:00:18 bugsnag.Notify: bugsnag/payload.deliver: invalid api key: ''
2023/08/27 15:00:18 bugsnag/sessions/publisher.publish invalid API key: ''
panic: [[ arc ]]: dnum 11 is not found in jobStatusNameMap [recovered]
	panic: [[ arc ]]: dnum 11 is not found in jobStatusNameMap [recovered]
	panic: [[ arc ]]: dnum 11 is not found in jobStatusNameMap
I think it's OK now, the errors has gone, Thanks a lot