Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graceful Shutdown of Workers #42

Open
cbatson opened this issue Jun 21, 2021 · 1 comment
Open

Graceful Shutdown of Workers #42

cbatson opened this issue Jun 21, 2021 · 1 comment

Comments

@cbatson
Copy link

cbatson commented Jun 21, 2021

Similar to awslabs/amazon-kinesis-client-nodejs#34

Would like to see this functionality in the Ruby client for MultiLangDaemon.

Thank you.

@devshorts
Copy link

devshorts commented May 9, 2024

@pfifer shutdown doesn't work at all. awslabs/amazon-kinesis-client#174 its easily reproducible with the given samples as well. Just start it up, hit control+c, nothing ever gracefully exits it just spews errors and blows up.

The ioproxy class is getting the signal propagated to it, it feels like signal handling needs to be caught by the java process and not sent down to the child process until after the shutdown initiate has occurred.

2024-05-09 16:48:55,991 [ShardRecordProcessor-0001] INFO  s.a.k.leases.KinesisShardDetector [NONE] - Stream kclrbsample: listing shards with list shards request ListShardsRequest(StreamName=kclrbsample)
2024-05-09 16:48:56,064 [ShardRecordProcessor-0001] INFO  s.a.kinesis.multilang.MessageWriter [NONE] - Writing ProcessRecordsMessage to child process for shard shardId-000000000000
^C2024-05-09 16:48:56,070 [multi-lang-daemon-0001] ERROR s.a.k.multilang.DrainChildSTDERRTask [NONE] - Received error line from subprocess [/Users/devshorts/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/aws-kclrb-2.1.1/lib/aws/kclrb/io_proxy.rb:31:in `readline': Interrupt] for shard shardId-000000000000
/Users/devshorts/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/aws-kclrb-2.1.1/lib/aws/kclrb/io_proxy.rb:31:in `readline': Interrupt
2024-05-09 16:48:56,070 [multi-lang-daemon-0001] ERROR s.a.k.multilang.DrainChildSTDERRTask [NONE] - Received error line from subprocess [	from /Users/devshorts/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/aws-kclrb-2.1.1/lib/aws/kclrb/io_proxy.rb:31:in `read_line'] for shard shardId-000000000000
	from /Users/devshorts/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/aws-kclrb-2.1.1/lib/aws/kclrb/io_proxy.rb:31:in `read_line'
2024-05-09 16:48:56,070 [multi-lang-daemon-0001] ERROR s.a.k.multilang.DrainChildSTDERRTask [NONE] - Received error line from subprocess [	from /Users/devshorts/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/aws-kclrb-2.1.1/lib/aws/kclrb/io_proxy.rb:45:in `read_action'] for shard shardId-000000000000
	from /Users/devshorts/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/aws-kclrb-2.1.1/lib/aws/kclrb/io_proxy.rb:45:in `read_action'
2024-05-09 16:48:56,070 [multi-lang-daemon-0001] ERROR s.a.k.multilang.DrainChildSTDERRTask [NONE] - Received error line from subprocess [	from /Users/devshorts/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/aws-kclrb-2.1.1/lib/aws/kclrb/kcl_process.rb:42:in `run'] for shard shardId-000000000000
	from /Users/devshorts/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/aws-kclrb-2.1.1/lib/aws/kclrb/kcl_process.rb:42:in `run'
2024-05-09 16:48:56,070 [multi-lang-daemon-0001] ERROR s.a.k.multilang.DrainChildSTDERRTask [NONE] - Received error line from subprocess [	from /Users/devshorts/src/external/amazon-kinesis-client-ruby/samples/sample_kcl.rb:99:in `<main>'] for shard shardId-000000000000
	from /Users/devshorts/src/external/amazon-kinesis-client-ruby/samples/sample_kcl.rb:99:in `<main>'
2024-05-09 16:48:56,070 [Thread-1] INFO  s.a.k.multilang.MultiLangDaemon [NONE] - Process terminated, will initiate shutdown.
2024-05-09 16:48:56,071 [multi-lang-daemon-0001] INFO  s.a.kinesis.multilang.LineReaderTask [NONE] - Stopping: Reading STDERR for shardId-000000000000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants