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

Fix async i/o error and move startup script #19736

Merged
merged 1 commit into from Aug 27, 2021
Merged

Fix async i/o error and move startup script #19736

merged 1 commit into from Aug 27, 2021

Conversation

joyrex2001
Copy link
Contributor

This PR starts the redpanda server with --smp 1 which resolves a Could not setup Async I/O: Resource temporarily unavailable. error when running tests using dind in k8s. This PR also moves the startup script to the /var/lib/redpanda/ folder which is owned by the redpanda user that runs the container.

See also: #19445

@cescoffier
Copy link
Member

Thanks! The PR looks good to me. Let's see what the CI has to say!

@gastaldi
Copy link
Contributor

Thanks! Is this PR supposed to resolve #19445 too completely?

@cescoffier
Copy link
Member

@gastaldi yes, but we need to change the title of the issue.

The PR fixes potential startup issues in some environments.

@gastaldi gastaldi linked an issue Aug 27, 2021 that may be closed by this pull request
@cescoffier
Copy link
Member

@gastaldi just updated the issue title.

@gastaldi gastaldi merged commit 6c3b462 into quarkusio:main Aug 27, 2021
@quarkus-bot quarkus-bot bot added this to the 2.3 - main milestone Aug 27, 2021
@Ladicek
Copy link
Contributor

Ladicek commented Sep 7, 2021

Hi @joyrex2001, this change (specifically the addition of --smp 1) breaks Kafka Dev Services for me locally. The Redpanda container fails to start with Could not initialize seastar: std::__1::system_error (error system:12, Cannot allocate memory).

Interestingly, if I add --memory 2G, it starts working again, but I don't know enough about Redpanda or Seastar to comment on why. I suspect that there's some automatic memory sizing logic that fails, but I don't really know.

I'm on Linux and have 32 GB of RAM. The container sees all those 32 GB of RAM (because we don't apply any memory cgroup limits), which is probably where the memory sizing logic gets confused.

Would that change (adding --memory 2G) be OK for you?

@joyrex2001
Copy link
Contributor Author

According to the cli documentation not specifying a memory limit would actually imply that it will use all available memory, which makes me also suspect the automatic sizing logic fails.

I tried various combinations of the cli arguments they suggest in the docker quick start and also played with the --thread-affinity and --num-io-queues arguments. In our case the only thing that works in our docker-in-docker setup is adding the --smp 1, the others don’t have any functional impact at our end.

The redpanda docker quick start sets it to 1G, and also sets the --overprovisioned and --reserve-memory 0M arguments. Setting these here as well is probably the best way forward. Do these settings (specifically 1G) work at your end as well?

@Ladicek
Copy link
Contributor

Ladicek commented Sep 7, 2021

So in addition to --smp 1, also add --memory 1G --overprovisioned --reserve-memory 0M? I tried that and that works for me. And I agree we should probably copy what the Redpanda quick start documentation shows.

@joyrex2001
Copy link
Contributor Author

Indeed :-) As this PR is already closed/merged, do you want me to create a new PR with the changes, or will you?

@Ladicek
Copy link
Contributor

Ladicek commented Sep 7, 2021

If you can submit a PR, that would be great, otherwise I'll do it tomorrow or the day after that. Thanks!

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

Successfully merging this pull request may close these issues.

Allow Redpanda dev service in kubedock
4 participants