scylladb / scylla-code-samples

Code samples for working with ScyllaDB
Apache License 2.0
237 stars 130 forks source link

docker-compose add sysctls for aio-max-nr #207

Open guy9 opened 1 year ago

guy9 commented 1 year ago

If a machine does not have the aio-max-nr value set correctly, starting the node fails. To solve this need to add to all docker-compose files in this repo, for each node:

....

 networks:
      web:
 sysctls:
      - fs.aio-max-nr=1048576

Currently, this fails as it is not supported by Docker. See here: https://docs.docker.com/engine/reference/commandline/run/#sysctl Follow up on this, and once added by Docker, add it to our files.

nmicra commented 9 months ago

I had similar issue, when I was trying to run example for springboot. FATAL: Exception during startup, aborting: std::runtime_error (Could not setup Async I/O: Resource temporarily unavailable. The most common cause is not enough request capacity in /proc/sys/fs/aio-max-nr. Try increasing that number or reducing the amount of logical CPUs available for your application) 2023-12-04 15:37:47,680 INFO exited: scylla (exit status 7; not expected) Traceback (most recent call last): File "/opt/scylladb/scripts/libexec/scylla-housekeeping", line 196, in <module> args.func(args) File "/opt/scylladb/scripts/libexec/scylla-housekeeping", line 122, in check_version current_version = sanitize_version(get_api('/storage_service/scylla_release_version')) File "/opt/scylladb/scripts/libexec/scylla-housekeeping", line 80, in get_api return get_json_from_url("http://" + api_address + path) File "/opt/scylladb/scripts/libexec/scylla-housekeeping", line 75, in get_json_from_url raise RuntimeError(f'Failed to get "{path}" due to the following error: {retval}') RuntimeError: Failed to get "http://localhost:10000/storage_service/scylla_release_version" due to the following error: <urlopen error [Errno 99] Cannot assign requested address> 2023-12-04 15:37:51,106 INFO spawned: 'scylla' with pid 115 FATAL: Exception during startup, aborting: std::runtime_error (Could not setup Async I/O: Resource temporarily unavailable. The most common cause is not enough request capacity in /proc/sys/fs/aio-max-nr. Try increasing that number or reducing the amount of logical CPUs available for your application)

philip-pandoscape commented 1 month ago

Is this still a problem? Because it is causing docker to look less and less appealing as a viable solution every day.

guy9 commented 1 month ago

AFAIK this didn't change, the aio-max-nr needs to be configured, see an explanation in this ScyllaDB University lesson for example. And feel free to send a PR ;-)