Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLSTATE[HY000]: General error: 1 too many SQL variables #791

Closed
nblock opened this issue Aug 9, 2016 · 2 comments
Closed

SQLSTATE[HY000]: General error: 1 too many SQL variables #791

nblock opened this issue Aug 9, 2016 · 2 comments
Assignees

Comments

@nblock
Copy link
Contributor

nblock commented Aug 9, 2016

Steps to reproduce

  1. Create a calendar with lots of entries
  2. Try to sync the with vdirsyncer

Expected behaviour

Having all calendar entries available on the filesystem.

Actual behaviour

During the sync operation NC sends a HTTP/500 error with the following message:

SQLSTATE[HY000]: General error: 1 too many SQL variables

Server configuration

Operating system: Arch Linux

Web server: nginx

Database: sqlite

PHP version: 7.0.9

Nextcloud version: 9.0.53

Updated from an older Nextcloud/ownCloud or fresh install: updated

Where did you install Nextcloud from: website

Signing status: All good

List of activated apps:

Enabled:
  - activity: 2.2.1
  - admin_audit: 1.0.0
  - calendar: true
  - comments: 0.2
  - contacts: true
  - dav: 0.1.6
  - federatedfilesharing: 0.1.0
  - federation: 0.0.4
  - files: 1.4.4
  - files_pdfviewer: 0.8.1
  - files_sharing: 0.9.1
  - files_trashbin: 0.8.0
  - files_versions: 1.2.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 14.5.0
  - notes: true
  - notifications: 0.2.3
  - password_policy: 1.0.0
  - provisioning_api: 0.4.1
  - systemtags: 0.2
  - tasks: true
  - templateeditor: 0.1
  - theming: 0.1.0
  - updatenotification: 0.1.0

Are you using encryption: no

Client configuration

Client: vdirsyncer 0.11.3

Operating system: Arch Linux

Nextcloud log (data/nextcloud.log)

Exception: {"Message":"An exception occurred while executing 'SELECT \"id\", \"uri\", \"lastmodified\", \"etag\", \"calendarid\", \"size\", \"calendardata\", \"componenttype\" FROM \"oc_calendarobjects\" WHERE (\"calendarid\" = ?) AND (\"uri\" IN (?, ?, ?,… ?, ?, ?, ?))' with params [\"1.ics\", \"2.ics\", …]cs\"]:\n\nSQLSTATE[HY000]: General error: 1 too many SQL variables","Exception":"Doctrine\\DBAL\\Exception\\DriverException","Code":0,"Trace":"#0 \/srv\/http\/nextcloud\/html\/nextcloud-9.0.53\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/DBALException.php(116): Doctrine\\DBAL\\Driver\\AbstractSQLiteDriver->convertException('An exception oc...', Object(Doctrine\\DBAL\\Driver\\PDOException))\n#1 \/srv\/http\/nextcloud\/html\/nextcloud-9.0.53\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Connection.php(836): Doctrine\\DBAL\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\DBAL\\Driver\\PDOSqlite\\Driver), Object(Doctrine\\DBAL\\Driver\\PDOException), 'SELECT \"id\", \"u...', Array)\n#2 \/srv\/http\/nextcloud\/html\/nextcloud-9.0.53\/lib\/private\/db\/connection.php(184): Doctrine\\DBAL\\Connection->executeQuery('SELECT \"id\", \"u...', Array, Array, NULL)\n#3 \/srv\/http\/nextcloud\/html\/nextcloud-9.0.53\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Query\/QueryBuilder.php(206): OC\\DB\\Connection->executeQuery('SELECT \"id\", \"u...', Array, Array)\n#4 \/srv\/http\/nextcloud\/html\/nextcloud-9.0.53\/lib\/private\/db\/querybuilder\/querybuilder.php(141): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 \/srv\/http\/nextcloud\/html\/nextcloud-9.0.53\/apps\/dav\/lib\/caldav\/caldavbackend.php(567): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 \/srv\/http\/nextcloud\/html\/nextcloud-9.0.53\/3rdparty\/sabre\/dav\/lib\/CalDAV\/Calendar.php(145): OCA\\DAV\\CalDAV\\CalDavBackend->getMultipleCalendarObjects('10', Array)\n#7 \/srv\/http\/nextcloud\/html\/nextcloud-9.0.53\/3rdparty\/sabre\/dav\/lib\/DAV\/Tree.php(272): Sabre\\CalDAV\\Calendar->getMultipleChildren(Array)\n#8 \/srv\/http\/nextcloud\/html\/nextcloud-9.0.53\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(960): Sabre\\DAV\\Tree->getMultipleNodes(Array)\n#9 \/srv\/http\/nextcloud\/html\/nextcloud-9.0.53\/3rdparty\/sabre\/dav\/lib\/CalDAV\/Plugin.php(432): Sabre\\DAV\\Server->getPropertiesForMultiplePaths(Array, Array)\n#10 \/srv\/http\/nextcloud\/html\/nextcloud-9.0.53\/3rdparty\/sabre\/dav\/lib\/CalDAV\/Plugin.php(232): Sabre\\CalDAV\\Plugin->calendarMultiGetReport(Object(Sabre\\CalDAV\\Xml\\Request\\CalendarMultiGetReport))\n#11 [internal function]: Sabre\\CalDAV\\Plugin->report('{urn:ietf:param...', Object(Sabre\\CalDAV\\Xml\\Request\\CalendarMultiGetReport), 'calendars\/tina\/...')\n#12 \/srv\/http\/nextcloud\/html\/nextcloud-9.0.53\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#13 \/srv\/http\/nextcloud\/html\/nextcloud-9.0.53\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(716): Sabre\\Event\\EventEmitter->emit('report', Array)\n#14 [internal function]: Sabre\\DAV\\CorePlugin->httpReport(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#15 \/srv\/http\/nextcloud\/html\/nextcloud-9.0.53\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#16 \/srv\/http\/nextcloud\/html\/nextcloud-9.0.53\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(459): Sabre\\Event\\EventEmitter->emit('method:REPORT', Array)\n#17 \/srv\/http\/nextcloud\/html\/nextcloud-9.0.53\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(248): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#18 \/srv\/http\/nextcloud\/html\/nextcloud-9.0.53\/apps\/dav\/lib\/server.php(148): Sabre\\DAV\\Server->exec()\n#19 \/srv\/http\/nextcloud\/html\/nextcloud-9.0.53\/apps\/dav\/appinfo\/v2\/remote.php(29): OCA\\DAV\\Server->exec()\n#20 \/srv\/http\/nextcloud\/html\/nextcloud-9.0.53\/remote.php(138): require_once('\/srv\/http\/nextc...')\n#21 {main}","File":"\/srv\/http\/nextcloud\/html\/nextcloud-9.0.53\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/AbstractSQLiteDriver.php","Line":85,"User":"username"}
@nickvergessen
Copy link
Member

Well the only real hint against this error is "upgrade your instance to use MySQL or Postgres".
SQLite does not support "huge" installations.
Do you know how many parameters we tried to use in your case? And maybe do you know the limit?

@nblock
Copy link
Contributor Author

nblock commented Sep 14, 2016

Well the only real hint against this error is "upgrade your instance to use MySQL or Postgres".

I would love to do so, see #173.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants