news icon indicating copy to clipboard operation
news copied to clipboard

SQLSTATE[HY000]: General error: 7 number of parameters must be between 0 and 65535 at

Open myxor opened this issue 1 year ago • 7 comments

IMPORTANT

Read and tick the following checkbox after you have created the issue or place an x inside the brackets ;)

  • [x] I have read the CONTRIBUTING.md and followed the provided tips
  • [x] I accept that the issue will be closed without comment if I do not check here
  • [x] I accept that the issue will be closed without comment if I do not fill out all items in the issue template.

Explain the Problem

What problem did you encounter? Following exception can be found in the logs:

OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 7 number of parameters must be between 0 and 65535 at <<closure>>
0. /var/www/html/lib/private/DB/ConnectionAdapter.php line 85
   OC\DB\Exceptions\DbalException::wrap(Doctrine\DBAL\Ex ... {})
1. /var/www/html/custom_apps/news/lib/Db/ItemMapperV2.php line 286
   OC\DB\ConnectionAdapter->executeStatement("UPDATE `*PREFIX ... )", [false,[54998,37 ... ]], [5,101])
2. /var/www/html/custom_apps/news/lib/Service/ItemServiceV2.php line 224
   OCA\News\Db\ItemMapperV2->readAll("marco", 99461)
3. /var/www/html/custom_apps/news/lib/Controller/ItemController.php line 308
   OCA\News\Service\ItemServiceV2->readAll("marco", 99461)
4. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 225
   OCA\News\Controller\ItemController->readAll(99461)
5. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 133
   OC\AppFramework\Http\Dispatcher->executeController(OCA\News\Controller\ItemController {}, "readAll")
6. /var/www/html/lib/private/AppFramework/App.php line 172
   OC\AppFramework\Http\Dispatcher->dispatch(OCA\News\Controller\ItemController {}, "readAll")
7. /var/www/html/lib/private/Route/Router.php line 298
   OC\AppFramework\App::main("OCA\\News\\Controller\\ItemController", "readAll", OC\AppFramework\ ... {}, ["news.item.readAll"])
8. /var/www/html/lib/base.php line 1023
   OC\Route\Router->match("/apps/news/items/read")
9. /var/www/html/index.php line 36
   OC::handleRequest()

POST /apps/news/items/read
from xx.xx.xx.xx by xxx at 2022-08-03T13:43:45+00:00

Steps to Reproduce

Explain what you did to encounter the issue

  1. I have a lot of feeds and a few (~50 right now) unread items
  2. Clicking on "unread items" and then "mark all as read" triggers the above exception
  3. The items are still unread

System Information

  • News app version: 18.1.0
  • Nextcloud version: 24.0.3
  • Cron type: (system cron/python updater/...) cron
  • PHP version: 8.0.21
  • Database and version: Postgresql 12
  • Browser and version: Firefox 103
  • OS and version: Ubuntu LTS
Contents of nextcloud/data/nextcloud.log
{"Exception":"PDOException","Message":"SQLSTATE[HY000]: General error: 7 number of parameters must be between 0 and 65535","Code":"HY000","Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":92,"function":"execute","class":"PDOStatement","type":"->","args":[null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1163,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":294,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->","args":["UPDATE \"oc_news_items\" SET \"unread\" = ? WHERE (id IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,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, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)) AND (unread != ?)",[false,54998,37793,43476,46174,"And 65914 more entries, set log level to debug to see all entries"],[5,1,1,1,1,"And 65914 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/html/lib/private/DB/ConnectionAdapter.php","line":83,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->","args":["UPDATE \"oc_news_items\" SET \"unread\" = :unread WHERE (id IN (:idList)) AND (unread != :unread)",[false,[54998,37793,43476,46174,45933,"And 65912 more entries, set log level to debug to see all entries"]],[5,101]]},{"file":"/var/www/html/custom_apps/news/lib/Db/ItemMapperV2.php","line":286,"function":"executeStatement","class":"OC\\DB\\ConnectionAdapter","type":"->","args":["UPDATE `*PREFIX*news_items` SET `unread` = :unread WHERE (id IN (:idList)) AND (unread != :unread)",[false,[54998,37793,43476,46174,45933,"And 65912 more entries, set log level to debug to see all entries"]],[5,101]]},{"file":"/var/www/html/custom_apps/news/lib/Service/ItemServiceV2.php","line":224,"function":"readAll","class":"OCA\\News\\Db\\ItemMapperV2","type":"->","args":["marco",99461]},{"file":"/var/www/html/custom_apps/news/lib/Controller/ItemController.php","line":308,"function":"readAll","class":"OCA\\News\\Service\\ItemServiceV2","type":"->","args":["marco",99461]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"readAll","class":"OCA\\News\\Controller\\ItemController","type":"->","args":[99461]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\News\\Controller\\ItemController"},"readAll"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\News\\Controller\\ItemController"},"readAll"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\News\\Controller\\ItemController","readAll",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},["news.item.readAll"]]},{"file":"/var/www/html/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/news/items/read"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","Line":92}}},"CustomMessage":"--"}}
Contents of Browser Error Console Read http://ggnome.com/wiki/Using_The_Browser_Error_Console if you are unsure what to put here
Nothing to see in browser console

myxor avatar Aug 03 '22 13:08 myxor

Hi, just for my understanding you have 50 feeds with x unread items, based on the error from psql more than 65535? Or maybe a bit less due to other parameters in the query.

Grotax avatar Aug 06 '22 08:08 Grotax

I do not think i have 65535 unread items as the ui says something about 50 unread items when i click on "mark all as read".

myxor avatar Aug 06 '22 17:08 myxor

Hmm interesting, I'm not sure if that is reproducible then.

Your explanation and the error don't fit.

Yesterday I already tried to reproduce it on my psql test instance, it's running on a newer psql version though.

I will try again but if it doesn't crash with 50-60 unread items I don't know what else to do.

Might be of course that there is a bug in the UI that only happens under certain conditions.

Grotax avatar Aug 07 '22 08:08 Grotax

One more information: Marking items as read by scrolling down in the Web UI (having this functionality enabled) works fine but "marking all unread items as read" by using the context menu of "unread items" element is causing the above exception.

myxor avatar Aug 09 '22 07:08 myxor

Hey, I tried again but I'm not able to reproduce this error. I had 300+ Unread items and marked them as read via the context menu.

No error or anything else.

My installation looks a bit different though I have Postgres v14 on the new Ubuntu LTS release with php 8.1, Nextcloud 24.0.3

Grotax avatar Aug 19 '22 12:08 Grotax

Oh @SMillerDev are we maybe selecting all items up to the latest itemID and then take all the item ids as parameter. https://github.com/nextcloud/news/blob/master/lib/Db/ItemMapperV2.php#L271-L299

That is maybe not a good idea when a user has a lot of items in general

Grotax avatar Aug 19 '22 12:08 Grotax

Might not work but by looking at the code maybe this -> #1873 will improve the actual update query quite a bit while making the select statement a bit more complex.

Grotax avatar Aug 19 '22 12:08 Grotax

It is happening again with news 21.2.0:

{
	"reqId": "HT2AfDfntitknS8ZtFZP",
	"level": 3,
	"time": "2022-09-20T08:30:32+00:00",
	"remoteAddr": "x.x.x.x",
	"user": "username",
	"app": "index",
	"method": "POST",
	"url": "/apps/news/items/read",
	"message": "An exception occurred while executing a query: SQLSTATE[HY000]: General error: 7 number of parameters must be between 0 and 65535",
	"userAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0",
	"version": "24.0.5.1",
	"exception": {
		"Exception": "OC\\DB\\Exceptions\\DbalException",
		"Message": "An exception occurred while executing a query: SQLSTATE[HY000]: General error: 7 number of parameters must be between 0 and 65535",
		"Code": 7,
		"Trace": [{
			"file": "/var/www/html/lib/private/DB/ConnectionAdapter.php",
			"line": 85,
			"function": "wrap",
			"class": "OC\\DB\\Exceptions\\DbalException",
			"type": "::",
			"args": [{
				"__class__": "Doctrine\\DBAL\\Exception\\DriverException"
			}]
		}, {
			"file": "/var/www/html/custom_apps/news/lib/Db/ItemMapperV2.php",
			"line": 297,
			"function": "executeStatement",
			"class": "OC\\DB\\ConnectionAdapter",
			"type": "->",
			"args": ["UPDATE `*PREFIX*news_items` SET `unread` = :unread WHERE (id IN (:idList)) AND (unread != :unread)", [false, [54998, 37793, 43476, 46174, 45933, "And 69573 more entries, set log level to debug to see all entries"]],
				[5, 101]
			]
		}, {
			"file": "/var/www/html/custom_apps/news/lib/Service/ItemServiceV2.php",
			"line": 224,
			"function": "readAll",
			"class": "OCA\\News\\Db\\ItemMapperV2",
			"type": "->",
			"args": ["username", 104218]
		}, {
			"file": "/var/www/html/custom_apps/news/lib/Controller/ItemController.php",
			"line": 308,
			"function": "readAll",
			"class": "OCA\\News\\Service\\ItemServiceV2",
			"type": "->",
			"args": ["username", 104218]
		}, {
			"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
			"line": 225,
			"function": "readAll",
			"class": "OCA\\News\\Controller\\ItemController",
			"type": "->",
			"args": [104218]
		}, {
			"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
			"line": 133,
			"function": "executeController",
			"class": "OC\\AppFramework\\Http\\Dispatcher",
			"type": "->",
			"args": [{
				"__class__": "OCA\\News\\Controller\\ItemController"
			}, "readAll"]
		}, {
			"file": "/var/www/html/lib/private/AppFramework/App.php",
			"line": 172,
			"function": "dispatch",
			"class": "OC\\AppFramework\\Http\\Dispatcher",
			"type": "->",
			"args": [{
				"__class__": "OCA\\News\\Controller\\ItemController"
			}, "readAll"]
		}, {
			"file": "/var/www/html/lib/private/Route/Router.php",
			"line": 298,
			"function": "main",
			"class": "OC\\AppFramework\\App",
			"type": "::",
			"args": ["OCA\\News\\Controller\\ItemController", "readAll", {
					"__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
				},
				["news.item.readAll"]
			]
		}, {
			"file": "/var/www/html/lib/base.php",
			"line": 1030,
			"function": "match",
			"class": "OC\\Route\\Router",
			"type": "->",
			"args": ["/apps/news/items/read"]
		}, {
			"file": "/var/www/html/index.php",
			"line": 36,
			"function": "handleRequest",
			"class": "OC",
			"type": "::",
			"args": []
		}],
		"File": "/var/www/html/lib/private/DB/Exceptions/DbalException.php",
		"Line": 71,
		"Previous": {
			"Exception": "Doctrine\\DBAL\\Exception\\DriverException",
			"Message": "An exception occurred while executing a query: SQLSTATE[HY000]: General error: 7 number of parameters must be between 0 and 65535",
			"Code": 7,
			"Trace": [{
					"file": "/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",
					"line": 1780,
					"function": "convert",
					"class": "Doctrine\\DBAL\\Driver\\API\\PostgreSQL\\ExceptionConverter",
					"type": "->",
					"args": [{
						"__class__": "Doctrine\\DBAL\\Driver\\PDO\\Exception"
					}, {
						"__class__": "Doctrine\\DBAL\\Query"
					}]
				}, {
					"file": "/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",
					"line": 1719,
					"function": "handleDriverException",
					"class": "Doctrine\\DBAL\\Connection",
					"type": "->",
					"args": [{
						"__class__": "Doctrine\\DBAL\\Driver\\PDO\\Exception"
					}, {
						"__class__": "Doctrine\\DBAL\\Query"
					}]
				}, {
					"file": "/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",
					"line": 1173,
					"function": "convertExceptionDuringQuery",
					"class": "Doctrine\\DBAL\\Connection",
					"type": "->",
					"args": [{
							"__class__": "Doctrine\\DBAL\\Driver\\PDO\\Exception"
						}, "UPDATE \"oc_news_items\" SET \"unread\" = ? WHERE (id IN (?, ?, ?, ?,
						...lots of question marks...
						?
						, ? , ? , ? , ? , ? )) AND(unread != ? )
				",[false,54998,37793,43476,46174,"
				And 69575 more entries, set log level to debug to see all entries "],[5,1,1,1,1,"
				And 69575 more entries, set log level to debug to see all entries "]]},{"
				file ":" /
				var / www / html / lib / private / DB / ConnectionAdapter.php ","
				line ":83,"
				function ":"
				executeStatement ","
				class ":"
				OC\\ DB\\ Connection ","
				type ":" - > ","
				args ":["
				UPDATE\ "oc_news_items\" SET \"unread\" = :unread WHERE (id IN (:idList)) AND (unread != :unread)", [false, [54998, 37793, 43476, 46174, 45933, "And 69573 more entries, set log level to debug to see all entries"]],
				[5, 101]
			]
		},
		{
			"file": "/var/www/html/custom_apps/news/lib/Db/ItemMapperV2.php",
			"line": 297,
			"function": "executeStatement",
			"class": "OC\\DB\\ConnectionAdapter",
			"type": "->",
			"args": ["UPDATE `*PREFIX*news_items` SET `unread` = :unread WHERE (id IN (:idList)) AND (unread != :unread)", [false, [54998, 37793, 43476, 46174, 45933, "And 69573 more entries, set log level to debug to see all entries"]],
				[5, 101]
			]
		},
		{
			"file": "/var/www/html/custom_apps/news/lib/Service/ItemServiceV2.php",
			"line": 224,
			"function": "readAll",
			"class": "OCA\\News\\Db\\ItemMapperV2",
			"type": "->",
			"args": ["username", 104218]
		},
		{
			"file": "/var/www/html/custom_apps/news/lib/Controller/ItemController.php",
			"line": 308,
			"function": "readAll",
			"class": "OCA\\News\\Service\\ItemServiceV2",
			"type": "->",
			"args": ["username", 104218]
		},
		{
			"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
			"line": 225,
			"function": "readAll",
			"class": "OCA\\News\\Controller\\ItemController",
			"type": "->",
			"args": [104218]
		},
		{
			"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
			"line": 133,
			"function": "executeController",
			"class": "OC\\AppFramework\\Http\\Dispatcher",
			"type": "->",
			"args": [{
				"__class__": "OCA\\News\\Controller\\ItemController"
			}, "readAll"]
		},
		{
			"file": "/var/www/html/lib/private/AppFramework/App.php",
			"line": 172,
			"function": "dispatch",
			"class": "OC\\AppFramework\\Http\\Dispatcher",
			"type": "->",
			"args": [{
				"__class__": "OCA\\News\\Controller\\ItemController"
			}, "readAll"]
		},
		{
			"file": "/var/www/html/lib/private/Route/Router.php",
			"line": 298,
			"function": "main",
			"class": "OC\\AppFramework\\App",
			"type": "::",
			"args": ["OCA\\News\\Controller\\ItemController", "readAll", {
					"__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
				},
				["news.item.readAll"]
			]
		},
		{
			"file": "/var/www/html/lib/base.php",
			"line": 1030,
			"function": "match",
			"class": "OC\\Route\\Router",
			"type": "->",
			"args": ["/apps/news/items/read"]
		},
		{
			"file": "/var/www/html/index.php",
			"line": 36,
			"function": "handleRequest",
			"class": "OC",
			"type": "::",
			"args": []
		}],
	"File": "/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
	"Line": 92
}
}
}, "CustomMessage": "--"
}
}

@Grotax Should i open a new issue?

myxor avatar Jul 11 '23 12:07 myxor

Hi, yes please open a new one also with a full description of what you are doing. How it can be reproduced.

Because last time I was not able to reproduce this.

And the query was improved a bit.

My guess would be that there is a large amount of items that is unread.

Grotax avatar Jul 11 '23 13:07 Grotax