()
| 608 | } |
| 609 | |
| 610 | private void verifyFileLimits() { |
| 611 | boolean insufficientLimits = false; |
| 612 | |
| 613 | final long fileLimit = Files.getFileLimit(); |
| 614 | if (fileLimit < 0) { |
| 615 | log.error().$("could not read fs.file-max [errno=").$(Os.errno()).I$(); |
| 616 | } |
| 617 | if (fileLimit > 0) { |
| 618 | if (fileLimit <= Files.DEFAULT_FILE_LIMIT) { |
| 619 | insufficientLimits = true; |
| 620 | log.advisoryW().$("fs.file-max limit is too low [limit=").$(fileLimit).$("] (SYSTEM COULD BE UNSTABLE)").$(); |
| 621 | } else { |
| 622 | log.advisoryW().$("fs.file-max checked [limit=").$(fileLimit).I$(); |
| 623 | } |
| 624 | } |
| 625 | |
| 626 | final long mapCountLimit = Files.getMapCountLimit(); |
| 627 | if (mapCountLimit < 0) { |
| 628 | log.error().$("could not read vm.max_map_count [errno=").$(Os.errno()).I$(); |
| 629 | } |
| 630 | if (mapCountLimit > 0) { |
| 631 | if (mapCountLimit <= Files.DEFAULT_MAP_COUNT_LIMIT) { |
| 632 | insufficientLimits = true; |
| 633 | log.advisoryW().$("vm.max_map_count limit is too low [limit=").$(mapCountLimit).$("] (SYSTEM COULD BE UNSTABLE)").$(); |
| 634 | } else { |
| 635 | log.advisoryW().$("vm.max_map_count checked [limit=").$(mapCountLimit).I$(); |
| 636 | } |
| 637 | } |
| 638 | |
| 639 | if (insufficientLimits) { |
| 640 | log.advisoryW().$("make sure to increase fs.file-max and vm.max_map_count limits:\n" + |
| 641 | "https://questdb.io/docs/deployment/capacity-planning/#os-configuration").$(); |
| 642 | } |
| 643 | } |
| 644 | |
| 645 | private void verifyFileSystem(Path path, CharSequence rootDir, String kind, boolean failOnNfs, boolean logUnstable) { |
| 646 | if (rootDir == null) { |
no test coverage detected