Created on 20 January 2024, about 1 year ago
Updated 27 January 2024, about 1 year ago

Problem/Motivation

I run on MSSQL and up until a few weeks ago everything was working fine. Now i get strange behaviour on site and sometimes a message "Data truncated". Do you have any idea?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Closed: works as designed

Version

4.4

Component

Code

Created by

πŸ‡ΈπŸ‡ͺSweden arne_hortell

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @arne_hortell
  • πŸ‡¬πŸ‡§United Kingdom pstewart

    'String or binary data would be truncated.' errors happen when an insert or update query is trying to set more data for a column than the size of that column allows. This shouldn't really ever happen for structured data (entities, field values etc), so if you're seeing it on entity tables then it's probably a bug on whatever module is providing the entity or field that is causing the error.

    There is a possibility that you could run into this on cache tables, for example if a piece of rendered content is too large for data column in the cache_render table. It would have to be pretty big though, the data columns in cache tables use the 'blob:big' field type, which maps on to the varbinary(max) SQL Server type and can hold 2^31 - 1 bytes (i.e. 2GB). In this case clearing caches could help but if there's a particular piece of rogue content that's triggering it then that piece of content will need to be fixed.

    I recommend you check the Drupal logs to work out the exact queries that are erroring so you can diagnose further, and checking how much storage your tables are using (i.e. in SSMS right click a table -> Properties -> Storage).

  • πŸ‡ΈπŸ‡ͺSweden arne_hortell

    I found the problem, issue and everything is now fine.
    It has nothing to do with module SqlSrv.

  • Status changed to Closed: works as designed about 1 year ago
  • πŸ‡¬πŸ‡§United Kingdom pstewart
Production build 0.71.5 2024