View Issue Details

IDProjectCategoryView StatusLast Update
0005491SOGoWeb Mailpublic2022-03-25 15:48
Reporterkulo Assigned Tofrancis  
Status resolvedResolutionfixed 
OSDebianOS Version11 
Product Versionnightly master 
Fixed in Versionnightly master 
Summary0005491: "Unhandled error" at webmail login

Since I upgraded sogo from nightly version to all users got an "unhandled error" on login.

I located an error in sogo.log:

Mar 11 01:43:33 sogod [412037]: [ERROR] <0x0x5654475f57f0[GCSSessionsFolder]> -[GCSSessionsFolder writeRecordForEntryWithID:value:creationDate:lastSeenDate:]: cannot write record: <MySQL4Exception: 0x5654476243c0> NAME:ExecutionFailed REASON:Data too long for column 'c_value' at row 1

and after enlarging the column c_value from 255 to 4096 with alter table sogo_sessions_folder modify c_value varchar(4096) not null; another error appeared in nginx/error.log:

2022/03/11 08:49:50 [error] 424133#424133: *4 upstream sent too big header while reading response header from upstream, client: **.***.***.*, server: _, request: "POST /SOGo/connect HTTP/2.0", upstream: "", host: "mail.****.**", referrer: "https://mail.****.**/SOGo/"

After invertigation on this error I inserted 3 lines with proxy buffers in the /etc/nginx/templates/sogo.tmpl:

location ^~ /SOGo {
    include /etc/nginx/templates/hsts.tmpl;


    # 2022-11-03 error sogo login
    proxy_buffer_size          128k;
    proxy_buffers              4 256k;
    proxy_busy_buffers_size    256k;

    # forward user's IP address
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $host;

After that the login works again but I don't know if this solution was optimal.

Additional Information

This SOGo installation is part of the iRedMail 1.5.1 server distribution. Database is MariaDB/MySQL with LDAP-Authentication, Webserver is nginx.

TagsNo tags attached.




2022-03-11 13:55

administrator   ~0015943

As mentioned in the documentation, you could have simply drop the sessions table and restart sogod; the table would have been recreated the proper schema.

Regarding the Web server, your solution is correct. The cookie is now much bigger than before (just bellow 4096 bytes, to accommodate longer passwords.



2022-03-13 13:16

reporter   ~0015944

francis - where is the documentation located? Nothing in the release notes on Github about this, or in the upgrading section of the online documentation at



2022-03-13 13:37

reporter   ~0015945

I suggest to add the drop sessions table action to the package upgrade script to avoid this problem.



2022-03-15 07:46

reporter   ~0015947

I confirm the problem is solved on SOGo after adding:

# 2022-11-03 error sogo login
proxy_buffer_size          128k;
proxy_buffers              4 256k;
proxy_busy_buffers_size    256k;


2022-03-25 15:48

administrator   ~0015955

Last edited: 2022-03-25 15:48

See also

Related Changesets

sogo: master 3e11e0a6

2022-03-25 15:22


Details Diff
chore: SQL update script for v5.6.0

Fixes 0005491
Affected Issues
add - Scripts/ Diff File

Issue History

Date Modified Username Field Change
2022-03-11 13:46 kulo New Issue
2022-03-11 13:55 francis Note Added: 0015943
2022-03-13 13:16 ahollandmoritz Note Added: 0015944
2022-03-13 13:37 kulo Note Added: 0015945
2022-03-15 07:46 maxycay Note Added: 0015947
2022-03-25 15:23 francis Changeset attached => sogo master 3e11e0a6
2022-03-25 15:23 francis Assigned To => francis
2022-03-25 15:23 francis Resolution open => fixed
2022-03-25 15:25 francis Description Updated
2022-03-25 15:48 francis Status new => resolved
2022-03-25 15:48 francis Fixed in Version => nightly master
2022-03-25 15:48 francis Note Added: 0015955
2022-03-25 15:48 francis Note Edited: 0015955