Repository navigation
Backlog
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
When a large number of files accumulates in the framework directories, cleanup fails during container creation or recreation:
/etc/s6-overlay/s6-rc.d/init-bookstack-config/run: line 12: /bin/rm: Argument list too long
The container starts, but the accumulated files remain on disk.
The issue was reproduced with the official v26.09.3-ls301 image using 73,298 session files, 3,852 cache files and 246 view files, without Docker Mods or custom initialization scripts.
Expected Behavior
Framework cleanup should complete successfully regardless of the number of accumulated files, while preserving the existing cleanup behavior and the dbwait.lock check.
Steps To Reproduce
- Prepare a persistent /config volume.
- Create 73,298 files with 40-character filenames in /config/www/framework/sessions, 3,852 files in cache and 246 files in views.
- Create and start a BookStack container using this volume and the official v26.09.3-ls301 image.
- Observe the "Argument list too long" error in the container startup log.
- Verify that the accumulated files have not been removed.
Environment
- OS: Ubuntu Server 24.04 LTS
- Docker Engine: 29.8.0
- Docker Compose: v5.5.1
- BookStack image: v26.09.3-ls301
- Container OS: Alpine Linux 3.24.4
- MariaDB image: lscr.io/linuxserver/mariadb:11.8.10
- GNU findutils: 4.10.0
- GNU coreutils: 9.11CPU architecture
x86-64
Docker creation
docker network create --internal bookstack-test-net
docker volume create bookstack-test-config
docker volume create bookstack-test-database
docker run -d \
--name bookstack-test-db \
--network bookstack-test-net \
--network-alias db \
--cpus 2 \
--memory 768m \
-e MYSQL_ROOT_PASSWORD="${ROOT_PASS}" \
-e MYSQL_DATABASE=bookstack \
-e MYSQL_USER=bookstack \
-e MYSQL_PASSWORD="${DB_PASS}" \
-e TZ=Etc/UTC \
-v bookstack-test-database:/config \
lscr.io/linuxserver/mariadb:11.8.10
docker run -d \
--name bookstack-test-app \
--network bookstack-test-net \
--cpus 2 \
--memory 768m \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Etc/UTC \
-e APP_URL=http://localhost \
-e APP_KEY="${APP_KEY}" \
-e DB_HOST=db \
-e DB_PORT=3306 \
-e DB_USERNAME=bookstack \
-e DB_PASSWORD="${DB_PASS}" \
-e DB_DATABASE=bookstack \
-v bookstack-test-config:/config \
lscr.io/linuxserver/bookstack:v26.09.3-ls301Container logs
[migrations] started
[migrations] 01-nginx-site-confs-default: executing...
[migrations] 01-nginx-site-confs-default: succeeded
[migrations] 02-default-location: executing...
[migrations] 02-default-location: succeeded
[migrations] done
───────────────────────────────────────
██╗ ███████╗██╗ ██████╗
██║ ██╔════╝██║██╔═══██╗
██║ ███████╗██║██║ ██║
██║ ╚════██║██║██║ ██║
███████╗███████║██║╚██████╔╝
╚══════╝╚══════╝╚═╝ ╚═════╝
Brought to you by linuxserver.io
───────────────────────────────────────
To support the app dev(s) visit:
Bookstack: https://www.bookstackapp.com/donate/
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID: 1000
User GID: 1000
───────────────────────────────────────
Linuxserver.io version: v26.09.3-ls301
Build-date: 2026-11-24T03:57:28+00:00
───────────────────────────────────────
Setting resolver to 127.0.0.11
Setting worker_processes to 16
generating self-signed keys in /config/keys, you can replace these with your own keys if required
.+..........+..+............+...+......+......+++++++++++++++++++++++++++++++++++++++*...+.+.....+.+...+.....+....+..+...+............+...+.+......+......+........+.+.....+....+++++++++++++++++++++++++++++++++++++++*...+........+.............+...+.....+......+......+.......+..+................+..+..........+.....+...+...+.........+.+..+....+...+......+......+...........+...+.+.....+.+..+...+....+...+..+.+............+......+..+....+.........+......+...+........+...+......+....+..............+......+......+.+........+......+.+..............+..........+...+......+..+.......+...+........+......+.+..+.........................+..+.+........+.+...........+.........+.+...+.........+.....+..........+........+..........+.................+......+.+.....+...+......+.+..................+...+.....+....+...+....................+...+...+.++++++
.......+...+..+.............+..+++++++++++++++++++++++++++++++++++++++*.............+..................+..+.+..+....+........+......+.+........+.+.....+.+++++++++++++++++++++++++++++++++++++++*...+...+......+....+.....+....+..+.+...+......+...........+..........+..+...+.......+...+..+.+.....+..........+..+...+.+.....+.+............+...+........+....+......+......+...............+........+..........+..+...............+......+...+....+..+...+...+....+...+......+.........+..+..........+...+..+....+...............+..+...+..........+......+.........+..............+.............+.....+.......+.....+...+...............+..........+.................+............+.+..+...+....+.....+.........+.+...+........+...+....+..+.+.................+.............+..+.......+...+...+..+.+.....+......++++++
-----
/etc/s6-overlay/s6-rc.d/init-bookstack-config/run: line 12: /bin/rm: Argument list too long
Waiting for DB to be available
INFO Preparing database.
Creating migration table ...................................... 16.36ms DONE
INFO Running migrations.
2014_10_12_000000_create_users_table ......................... 188.69ms DONE
2014_10_12_100000_create_password_resets_table ................ 48.75ms DONE
2015_07_12_114933_create_books_table .......................... 10.13ms DONE
2015_07_12_190027_create_pages_table .......................... 11.82ms DONE
2015_07_13_172121_create_images_table .......................... 9.59ms DONE
2015_07_27_172342_create_chapters_table ........................ 6.98ms DONE
2015_08_08_200447_add_users_to_entities ...................... 110.14ms DONE
2015_08_09_093534_create_page_revisions_table .................. 7.63ms DONE
2015_08_16_142133_create_activities_table ..................... 12.26ms DONE
2015_08_29_105422_add_roles_and_permissions .................. 237.72ms DONE
2015_08_30_125859_create_settings_table ........................ 9.32ms DONE
2015_08_31_175240_add_search_indexes ........................... 0.02ms DONE
2015_09_04_165821_create_social_accounts_table ................ 44.72ms DONE
2015_09_05_164707_add_email_confirmation_table ................ 69.28ms DONE
2015_11_21_145609_create_views_table ........................... 7.38ms DONE
2015_11_26_221857_add_entity_indexes ......................... 369.38ms DONE
2015_12_05_145049_fulltext_weighting ........................... 0.03ms DONE
2015_12_07_195238_add_image_upload_types ...................... 57.86ms DONE
2015_12_09_195748_add_user_avatars ............................ 13.00ms DONE
2016_01_11_210908_add_external_auth_to_users .................. 33.06ms DONE
2016_02_25_184030_add_slug_to_revisions ....................... 63.91ms DONE
2016_02_27_120329_update_permissions_and_roles ............... 107.36ms DONE
2016_02_28_084200_add_entity_access_controls ................. 200.18ms DONE
2016_03_09_203143_add_page_revision_types ..................... 32.55ms DONE
2016_03_13_082138_add_page_drafts ............................. 31.53ms DONE
2016_03_25_123157_add_markdown_support ........................ 26.36ms DONE
2016_04_09_100730_add_view_permissions_to_roles ............... 27.42ms DONE
2016_04_20_192649_create_joint_permissions_table ............. 202.28ms DONE
2016_05_06_185215_create_tags_table ........................... 82.15ms DONE
2016_07_07_181521_add_summary_to_page_revisions ............... 14.62ms DONE
2016_09_29_101449_remove_hidden_roles ......................... 57.24ms DONE
2016_10_09_142037_create_attachments_table .................... 41.56ms DONE
2017_01_21_163556_create_cache_table .......................... 23.05ms DONE
2017_01_21_163602_create_sessions_table ....................... 26.50ms DONE
2017_03_19_091553_create_search_index_table ................... 74.34ms DONE
2017_04_20_185112_add_revision_counts ......................... 44.68ms DONE
2017_07_02_152834_update_db_encoding_to_ut8mb4 ................. 0.02ms DONE
2017_08_01_130541_create_comments_table ....................... 70.13ms DONE
2017_08_29_102650_add_cover_image_display ..................... 13.85ms DONE
2018_07_15_173514_add_role_external_auth_id ................... 30.85ms DONE
2018_08_04_115700_create_bookshelves_table ................... 243.79ms DONE
2019_07_07_112515_add_template_support ........................ 33.38ms DONE
2019_08_17_140214_add_user_invites_table ...................... 40.30ms DONE
2019_12_29_120917_add_api_auth ................................ 58.62ms DONE
2020_08_04_111754_drop_joint_permissions_id ................... 64.97ms DONE
2020_08_04_131052_remove_role_name_field ...................... 14.41ms DONE
2020_09_19_094251_add_activity_indexes ........................ 31.08ms DONE
2020_09_27_210059_add_entity_soft_deletes ..................... 57.32ms DONE
2020_09_27_210528_create_deletions_table ...................... 52.99ms DONE
2020_11_07_232321_simplify_activities_table ................... 96.61ms DONE
2020_12_30_173528_add_owned_by_field_to_entities ............. 134.85ms DONE
2021_01_30_225441_add_settings_type_column .................... 10.90ms DONE
2021_03_08_215138_add_user_slug ............................... 35.95ms DONE
2021_05_15_173110_create_favourites_table ..................... 41.92ms DONE
2021_06_30_173111_create_mfa_values_table ..................... 42.26ms DONE
2021_07_03_085038_add_mfa_enforced_to_roles_table ............. 13.41ms DONE
2021_08_28_161743_add_export_role_permission ................... 2.91ms DONE
2021_09_26_044614_add_activities_ip_column .................... 16.73ms DONE
2021_11_26_070438_add_index_for_user_ip ....................... 16.69ms DONE
2021_12_07_111343_create_webhooks_table ....................... 82.29ms DONE
2021_12_13_152024_create_jobs_table ........................... 23.46ms DONE
2021_12_13_152120_create_failed_jobs_table .................... 22.26ms DONE
2022_01_03_154041_add_webhooks_timeout_error_columns .......... 51.85ms DONE
2022_04_17_101741_add_editor_change_field_and_permission ...... 16.43ms DONE
2022_04_25_140741_update_polymorphic_types ..................... 9.54ms DONE
2022_07_16_170051_drop_joint_permission_type .................. 80.40ms DONE
2022_08_17_092941_create_references_table ..................... 75.35ms DONE
2022_09_02_082910_fix_shelf_cover_image_types .................. 0.29ms DONE
2022_10_07_091406_flatten_entity_permissions_table ............ 62.45ms DONE
2022_10_08_104202_drop_entity_restricted_field ................ 66.45ms DONE
2023_01_24_104625_refactor_joint_permissions_storage .......... 98.72ms DONE
2023_01_28_141230_copy_color_settings_for_dark_mode ............ 0.53ms DONE
2023_02_20_093655_increase_attachments_path_length ............ 21.10ms DONE
2023_02_23_200227_add_updated_at_index_to_pages ............... 16.14ms DONE
2023_06_10_071823_remove_guest_user_secondary_roles ............ 1.06ms DONE
2023_06_25_181952_remove_bookshelf_create_entity_permissions ... 0.02ms DONE
2023_07_25_124945_add_receive_notifications_role_permissions ... 2.58ms DONE
2023_07_31_104430_create_watches_table ........................ 55.66ms DONE
2023_08_21_174248_increase_cache_size ......................... 19.71ms DONE
2023_12_02_104541_add_default_template_to_books ............... 15.80ms DONE
2023_12_17_140913_add_description_html_to_entities ............ 43.98ms DONE
2024_01_01_104542_add_default_template_to_chapters ............ 14.89ms DONE
2024_02_04_141358_add_views_updated_index ..................... 15.74ms DONE
2024_05_04_154409_rename_activity_relation_columns ............ 27.24ms DONE
2024_09_29_140340_ensure_editor_value_set ...................... 1.24ms DONE
2024_10_29_114420_add_import_role_permission ................... 2.49ms DONE
2024_11_02_160700_create_imports_table ........................ 23.66ms DONE
2024_11_27_171039_add_instance_id_setting ...................... 3.56ms DONE
2025_01_29_180933_create_sort_rules_table ...................... 6.49ms DONE
2025_02_05_150842_add_sort_rule_id_to_books ................... 15.57ms DONE
2025_04_18_215145_add_content_refs_and_archived_to_comments ... 44.68ms DONE
2025_09_02_111542_remove_unused_columns ....................... 45.84ms DONE
2025_09_15_132850_create_entities_table ...................... 175.56ms DONE
2025_09_15_134701_migrate_entity_data .......................... 6.79ms DONE
2025_09_15_134751_update_entity_relation_columns ............. 506.42ms DONE
2025_09_15_134813_drop_old_entity_tables ...................... 35.89ms DONE
2025_10_18_163331_clean_user_id_references ................... 285.20ms DONE
2025_10_22_134507_update_comments_relation_field_names ........ 24.58ms DONE
2025_11_23_161812_create_slug_history_table ................... 73.20ms DONE
2025_12_15_140219_create_mention_history_table ................ 40.52ms DONE
2025_12_19_103417_add_views_viewable_type_index ............... 16.00ms DONE
2026_04_19_141616_add_revision_view_all_permission ............. 3.61ms DONE
2026_07_27_201402_update_users_external_auth_id_collation ..... 15.15ms DONE
[custom-init] No custom files found, skipping...
[ls.io-init] done.Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsIssues
Activity
github-actions commentedon Nov 28, 2026
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.
ssddanbrown commentedon Nov 28, 2026
Hi @avmaksimov,
Out of interest, is this is legitimate scenario that occurred in actual use?
Or was the issue theorised before emulating the scenario?