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

edit/save not possible if description size exceeds a threshold #4015

Closed
joergsch opened this issue Aug 30, 2022 · 3 comments
Closed

edit/save not possible if description size exceeds a threshold #4015

joergsch opened this issue Aug 30, 2022 · 3 comments

Comments

@joergsch
Copy link

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Describe the bug
If a card reaches a threshold regarding content size, it is no longer possible to edit it. One can not even remove content, it is simply frozen.

To Reproduce
Steps to reproduce the behavior:

  1. create a new card
  2. add text
  3. add much more text
  4. close card
  5. jump to 3) until you see "Description (Saving…)"

Expected behavior
It should be possible to add more and more text

Screenshots
If applicable, add screenshots to help explain your problem.

Client details:

  • OS: Linux
  • Browser Firefox
  • Version 104
  • Device: desktop
Server details

Operating system: Linux

Web server: nginx 1.18

Database: postgres 13

PHP version: 7.4

Nextcloud version: 24.0.4

Where did you install Nextcloud from: nextcloud web page

Signing status:

No errors have been found.

List of activated apps:

Enabled:
  - apporder: 0.15.0
  - bookmarks: 11.0.1
  - bruteforcesettings: 2.4.0
  - calendar: 3.4.3
  - cloud_federation_api: 1.7.0
  - comments: 1.14.0
  - contacts: 4.2.0
  - dav: 1.22.0
  - deck: 1.7.1
  - drawio: 1.0.3
  - federatedfilesharing: 1.14.0
  - files: 1.19.0
  - files_external: 1.16.1
  - files_markdown: 2.3.6
  - files_mindmap: 0.0.26
  - files_pdfviewer: 2.5.0
  - files_sharing: 1.16.2
  - files_trashbin: 1.14.0
  - files_versions: 1.17.0
  - files_videoplayer: 1.13.0
  - gpoddersync: 3.4.0
  - integration_gitlab: 1.0.6
  - keeweb: 0.6.9
  - logreader: 2.9.0
  - lookup_server_connector: 1.12.0
  - mail: 1.13.8
  - maps: 0.2.0
  - notes: 4.5.0
  - notifications: 2.12.0
  - oauth2: 1.12.0
  - ocdownloader: 1.8.0
  - photos: 1.6.0
  - privacy: 1.8.0
  - provisioning_api: 1.14.0
  - recommendations: 1.3.0
  - settings: 1.6.0
  - sharebymail: 1.14.0
  - tables: 0.2.0
  - tasks: 0.14.4
  - text: 3.5.1
  - theming: 1.15.0
  - twofactor_backupcodes: 1.13.0
  - updatenotification: 1.14.0
  - user_status: 1.4.0
  - viewer: 1.8.0
  - workflowengine: 2.6.0
Disabled:
  - accessibility: 1.0.1
  - activity: 2.8.2
  - admin_audit: 1.5.0
  - circles: 22.1.1
  - contactsinteraction: 1.3.0
  - dashboard: 1.6.2
  - encryption
  - federation: 1.4.0
  - files_readmemd: 1.2.2
  - files_rightclick: 0.15.1
  - firstrunwizard: 1.0
  - nextcloud_announcements: 1.4.0
  - password_policy: 1.5.0
  - serverinfo: 1.5.0
  - support: 1.0.0
  - survey_client: 1.2.0
  - systemtags: 1.12.0
  - user_ldap
  - weather_status: 1.2.0

Nextcloud configuration:

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwritewebroot": "\/",
        "overwrite.cli.url": "https:\/\/***REMOVED SENSITIVE VALUE***\/",
        "dbtype": "pgsql",
        "version": "24.0.4.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "theme": "",
        "overwritehost": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "maintenance": false,
        "loglevel": 1,
        "defaultapp": "calendar",
        "log_rotate_size": 104857600,
        "trusted_domains": [
            "oc.schuetter.org"
        ],
        "enable_previews": true,
        "preview_max_scale_factor": 10,
        "preview_libreoffice_path": "\/usr\/bin\/libreoffice",
        "preview_office_cl_parameters": "",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "updatechecker": true,
        "debug": false,
        "trashbin_retention_obligation": "auto",
        "appstoreenabled": true,
        "appstore.experimental.enabled": false,
        "path": "\/var\/www_nextcloud\/apps",
        "logtimezone": "Europe\/Berlin",
        "log_type": "owncloud",
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "has_rebuilt_cache": true,
        "updater.release.channel": "stable",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "default_phone_region": "DE",
        "app_install_overwrite": [
            "ocdownloader"
        ],
        "auth.bruteforce.protection.enabled": true
    }
}

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

no

Logs

Nextcloud log (data/nextcloud.log)

{"reqId":"vjMBbICH2Ibzs2S5fmCU","level":3,"time":"2022-08-30T19:15:22+02:00","remoteAddr":"92.117.213.194","user":"joerg","app":"deck","method":"PUT","url":"/index.php/cards/701","message":"An exception occurred while executing a query: SQLSTATE[54000]: Program limit exceeded: 7 ERROR:  index row size 3016 exceeds btree version 4 maximum 2704 for index \"idx_last_editor\"\nDETAIL:  Index row references tuple (44,10) in relation \"oc_deck_cards\".\nHINT:  Values larger than 1/3 of a buffer page cannot be indexed.\nConsider a function index of an MD5 hash of the value, or use full text indexing.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0","version":"24.0.4.1","exception":{"Exception":"OC\\DB\\Exceptions\\DbalException","Message":"An exception occurred while executing a query: SQLSTATE[54000]: Program limit exceeded: 7 ERROR:  index row size 3016 exceeds btree version 4 maximum 2704 for index \"idx_last_editor\"\nDETAIL:  Index row references tuple (44,10) in relation \"oc_deck_cards\".\nHINT:  Values larger than 1/3 of a buffer page cannot be indexed.\nConsider a function index of an MD5 hash of the value, or use full text indexing.","Code":7,"Trace":[{"file":"/var/www_nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":329,"function":"wrap","class":"OC\\DB\\Exceptions\\DbalException","type":"::"},{"file":"/var/www_nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":221,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www_nextcloud/apps/deck/lib/Db/CardMapper.php","line":122,"function":"update","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www_nextcloud/apps/deck/lib/Service/CardService.php","line":365,"function":"update","class":"OCA\\Deck\\Db\\CardMapper","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www_nextcloud/apps/deck/lib/Controller/CardController.php","line":98,"function":"update","class":"OCA\\Deck\\Service\\CardService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www_nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"update","class":"OCA\\Deck\\Controller\\CardController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www_nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www_nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www_nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www_nextcloud/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www_nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www_nextcloud/lib/private/DB/Exceptions/DbalException.php","Line":71,"Previous":{"Exception":"Doctrine\\DBAL\\Exception\\DriverException","Message":"An exception occurred while executing a query: SQLSTATE[54000]: Program limit exceeded: 7 ERROR:  index row size 3016 exceeds btree version 4 maximum 2704 for index \"idx_last_editor\"\nDETAIL:  Index row references tuple (44,10) in relation \"oc_deck_cards\".\nHINT:  Values larger than 1/3 of a buffer page cannot be indexed.\nConsider a function index of an MD5 hash of the value, or use full text indexing.","Code":7,"Trace":[{"file":"/var/www_nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1780,"function":"convert","class":"Doctrine\\DBAL\\Driver\\API\\PostgreSQL\\ExceptionConverter","type":"->"},{"file":"/var/www_nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1719,"function":"handleDriverException","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www_nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1173,"function":"convertExceptionDuringQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www_nextcloud/lib/private/DB/Connection.php","line":294,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www_nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":354,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www_nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":281,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www_nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":327,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www_nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":221,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www_nextcloud/apps/deck/lib/Db/CardMapper.php","line":122,"function":"update","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www_nextcloud/apps/deck/lib/Service/CardService.php","line":365,"function":"update","class":"OCA\\Deck\\Db\\CardMapper","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www_nextcloud/apps/deck/lib/Controller/CardController.php","line":98,"function":"update","class":"OCA\\Deck\\Service\\CardService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www_nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"update","class":"OCA\\Deck\\Controller\\CardController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www_nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www_nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www_nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www_nextcloud/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www_nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www_nextcloud/3rdparty/doctrine/dbal/src/Driver/API/PostgreSQL/ExceptionConverter.php","Line":83,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDO\\Exception","Message":"SQLSTATE[54000]: Program limit exceeded: 7 ERROR:  index row size 3016 exceeds btree version 4 maximum 2704 for index \"idx_last_editor\"\nDETAIL:  Index row references tuple (44,10) in relation \"oc_deck_cards\".\nHINT:  Values larger than 1/3 of a buffer page cannot be indexed.\nConsider a function index of an MD5 hash of the value, or use full text indexing.","Code":7,"Trace":[{"file":"/var/www_nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":94,"function":"new","class":"Doctrine\\DBAL\\Driver\\PDO\\Exception","type":"::"},{"file":"/var/www_nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1163,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->"},{"file":"/var/www_nextcloud/lib/private/DB/Connection.php","line":294,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www_nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":354,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www_nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":281,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www_nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":327,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www_nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":221,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www_nextcloud/apps/deck/lib/Db/CardMapper.php","line":122,"function":"update","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www_nextcloud/apps/deck/lib/Service/CardService.php","line":365,"function":"update","class":"OCA\\Deck\\Db\\CardMapper","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www_nextcloud/apps/deck/lib/Controller/CardController.php","line":98,"function":"update","class":"OCA\\Deck\\Service\\CardService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www_nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"update","class":"OCA\\Deck\\Controller\\CardController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www_nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www_nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www_nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www_nextcloud/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www_nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www_nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php","Line":26,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[54000]: Program limit exceeded: 7 ERROR:  index row size 3016 exceeds btree version 4 maximum 2704 for index \"idx_last_editor\"\nDETAIL:  Index row references tuple (44,10) in relation \"oc_deck_cards\".\nHINT:  Values larger than 1/3 of a buffer page cannot be indexed.\nConsider a function index of an MD5 hash of the value, or use full text indexing.","Code":"54000","Trace":[{"file":"/var/www_nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":92,"function":"execute","class":"PDOStatement","type":"->"},{"file":"/var/www_nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1163,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->"},{"file":"/var/www_nextcloud/lib/private/DB/Connection.php","line":294,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www_nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":354,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www_nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":281,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www_nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":327,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www_nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":221,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www_nextcloud/apps/deck/lib/Db/CardMapper.php","line":122,"function":"update","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www_nextcloud/apps/deck/lib/Service/CardService.php","line":365,"function":"update","class":"OCA\\Deck\\Db\\CardMapper","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www_nextcloud/apps/deck/lib/Controller/CardController.php","line":98,"function":"update","class":"OCA\\Deck\\Service\\CardService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www_nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"update","class":"OCA\\Deck\\Controller\\CardController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www_nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www_nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www_nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www_nextcloud/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www_nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www_nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","Line":92}}},"CustomMessage":"--"}}
@joergsch
Copy link
Author

Removing one index via drop index idx_last_editor; seems to be a workaround, but I do not know if this slows things down.

The index was defined as "idx_last_editor" btree (last_editor, description_prev)

@joergsch
Copy link
Author

I was able to create a index which hits on looking for not null values, and does not have the issue regarding the size limitation.

create index idx_last_editor on oc_deck_cards using btree (last_editor) where last_editor is not null and description_prev is not null;

How to verify if this is working?

explain analyze select id, title, duedate, notified, description_prev, last_editor, description from oc_deck_cards WHERE last_editor IS NOT NULL AND description_prev IS NOT NULL;
                                                            QUERY PLAN                                                            
----------------------------------------------------------------------------------------------------------------------------------
 Index Scan using idx_last_editor on oc_deck_cards  (cost=0.12..8.14 rows=1 width=1050) (actual time=0.002..0.002 rows=0 loops=1)
 Planning Time: 0.261 ms
 Execution Time: 0.016 ms
(3 rows)

The values of the "original" index look like this:

explain analyze select id, title, duedate, notified, description_prev, last_editor, description from oc_deck_cards WHERE last_editor IS NOT NULL AND description_prev IS NOT NULL;
                                                            QUERY PLAN                                                            
----------------------------------------------------------------------------------------------------------------------------------
 Index Scan using idx_last_editor on oc_deck_cards  (cost=0.15..8.50 rows=1 width=1050) (actual time=0.050..0.050 rows=0 loops=1)
   Index Cond: ((last_editor IS NOT NULL) AND (description_prev IS NOT NULL))
 Planning Time: 0.228 ms
 Execution Time: 0.066 ms
(4 rows)

Total time is rather similar, having only 770 entries in my database.
The planning time stays the same, regardless of the number of entries. The execution time depends on the number of entries. The more entries are in the table, the more performant would the adjusted index become.

@juliusknorr
Copy link
Member

Fixed by #5260

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

No branches or pull requests

2 participants