'too many placeholders at ' while saving Page. #5051

Closed
opened 2026-02-05 09:36:44 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @OnlySlon on GitHub (Nov 14, 2024).

Describe the Bug

[previous exception] [object] (PDOException(code: HY000): SQLSTATE[HY000]: General error: 1390 Prepared statement contains too many placeholders at /var/www/bookstack/vendor/laravel/framew ork/src/Illuminate/Database/MySqlConnection.php:39) [stacktrace] #0 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Database/MySqlConnection.php(39): PDO->prepare() #1 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Database/Connection.php(816): Illuminate\\Database\\MySqlConnection->Illuminate\\Database\\{closure}() #2 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Database/Connection.php(783): Illuminate\\Database\\Connection->runQueryCallback() #3 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Database/MySqlConnection.php(34): Illuminate\\Database\\Connection->run() #4 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3498): Illuminate\\Database\\MySqlConnection->insert() #5 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1982): Illuminate\\Database\\Query\\Builder->insert() #6 /var/www/bookstack/app/Search/SearchIndex.php(33): Illuminate\\Database\\Eloquent\\Builder->__call() #7 /var/www/bookstack/app/Entities/Models/Entity.php(308): BookStack\\Search\\SearchIndex->indexEntity() #8 /var/www/bookstack/app/Entities/Repos/BaseRepo.php(78): BookStack\\Entities\\Models\\Entity->indexForSearch() #9 /var/www/bookstack/app/Entities/Repos/PageRepo.php(101): BookStack\\Entities\\Repos\\BaseRepo->update() #10 /var/www/bookstack/app/Entities/Controllers/PageController.php(225): BookStack\\Entities\\Repos\\PageRepo->update() #11 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): BookStack\\Entities\\Controllers\\PageController->update() #12 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate\\Routing\\Controller->callAction() #13 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Route.php(259): Illuminate\\Routing\\ControllerDispatcher->dispatch() #14 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\\Routing\\Route->runController() #15 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php(806): Illuminate\\Routing\\Route->run()

Steps to Reproduce

Saving big c-header size (3.2Mb) inside pre-tags

Expected Behaviour

code 200

Screenshots or Additional Context

No response

Browser Details

No response

Exact BookStack Version

git head

Originally created by @OnlySlon on GitHub (Nov 14, 2024). ### Describe the Bug `[previous exception] [object] (PDOException(code: HY000): SQLSTATE[HY000]: General error: 1390 Prepared statement contains too many placeholders at /var/www/bookstack/vendor/laravel/framew ork/src/Illuminate/Database/MySqlConnection.php:39) [stacktrace] #0 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Database/MySqlConnection.php(39): PDO->prepare() #1 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Database/Connection.php(816): Illuminate\\Database\\MySqlConnection->Illuminate\\Database\\{closure}() #2 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Database/Connection.php(783): Illuminate\\Database\\Connection->runQueryCallback() #3 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Database/MySqlConnection.php(34): Illuminate\\Database\\Connection->run() #4 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3498): Illuminate\\Database\\MySqlConnection->insert() #5 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1982): Illuminate\\Database\\Query\\Builder->insert() #6 /var/www/bookstack/app/Search/SearchIndex.php(33): Illuminate\\Database\\Eloquent\\Builder->__call() #7 /var/www/bookstack/app/Entities/Models/Entity.php(308): BookStack\\Search\\SearchIndex->indexEntity() #8 /var/www/bookstack/app/Entities/Repos/BaseRepo.php(78): BookStack\\Entities\\Models\\Entity->indexForSearch() #9 /var/www/bookstack/app/Entities/Repos/PageRepo.php(101): BookStack\\Entities\\Repos\\BaseRepo->update() #10 /var/www/bookstack/app/Entities/Controllers/PageController.php(225): BookStack\\Entities\\Repos\\PageRepo->update() #11 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): BookStack\\Entities\\Controllers\\PageController->update() #12 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate\\Routing\\Controller->callAction() #13 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Route.php(259): Illuminate\\Routing\\ControllerDispatcher->dispatch() #14 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\\Routing\\Route->runController() #15 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php(806): Illuminate\\Routing\\Route->run() ` ### Steps to Reproduce Saving big c-header size (3.2Mb) inside pre-tags ### Expected Behaviour code 200 ### Screenshots or Additional Context _No response_ ### Browser Details _No response_ ### Exact BookStack Version git head
OVERLORD added the 🐛 Bug label 2026-02-05 09:36:44 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Nov 14, 2024):

Looks like we need to add some extra chunking/handling for search term index insertion.
I've assigned this to the next feature release to be confirmed/addresses.

That said, >3MB of content is pretty massive and BookStack pages are not really intended for that kind of scale, so you may face other issues or side-affects with so much content for a single page.

@ssddanbrown commented on GitHub (Nov 14, 2024): Looks like we need to add some extra chunking/handling for search term index insertion. I've assigned this to the next feature release to be confirmed/addresses. That said, >3MB of content is pretty massive and BookStack pages are not really intended for that kind of scale, so you may face other issues or side-affects with so much content for a single page.
Author
Owner

@ssddanbrown commented on GitHub (Dec 11, 2024):

The handling of this particular error when indexing a page with many terms, has now been addressed as part of 509af2463d and will be part of the next feature release.
But as mentioned above, you may run into other issues or limitations with massive pages so they are not advised.

Thanks for originally reporting this issue @OnlySlon!

@ssddanbrown commented on GitHub (Dec 11, 2024): The handling of this particular error when indexing a page with many terms, has now been addressed as part of 509af2463d94210fd500c10c651fa8f883e87fd8 and will be part of the next feature release. But as mentioned above, you may run into other issues or limitations with massive pages so they are not advised. Thanks for originally reporting this issue @OnlySlon!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5051