Intermittent "Can't initialize character set latin1 errors" after centos 6 install

399 views
Skip to first unread message

zignorp

unread,
Mar 31, 2015, 1:52:14 PM3/31/15
to django...@googlegroups.com
Hello,
We have an application that doesn't have much user interaction, mostly list displays that has been stable for quite some time. We haven't changed it since moving to django 1.6.5
but centos was just upgraded from 5 to 6 on the server we need to work on.
After this we started noticing intermittent:
OperationalError: (2019, "Can't initialize character set latin1 (path: /usr/share/mysql/charsets/)")
errors. 

These errors will show up randomly for 7-18 minutes, perhaps twice a week, and I can't discern any pattern for when they're showing up.
When they stop happening, I can hit the same urls, with no content/data changed, and it's fine.

We are using mysql-python 1.2.5


When we check the db, it's:
| character_set_database | utf8            |
| collation_database     | utf8_general_ci |


Settings are:
DATABASES = {
     'default': {
        'ENGINE': 'django.db.backends.mysql', 
        'NAME': 'dbname',                    
        'USER': 'dbuser',                     
        'PASSWORD': 'dbpassword',                
        'HOST': 'host',                    
        'PORT': '',    
        "OPTIONS": { 
        'sql_mode': 'TRADITIONAL,STRICT_ALL_TABLES,ANSI', 
'connect_timeout': 10, 
'charset': 'utf8', 
'init_command': 'SET storage_engine=INNODB', 

       }
}

We just added the sql_mode to match settings from other applications on the server, but the error was happening without it. We haven't been able to reproduce it. The server shows:

SHOW variables LIKE '%character_set%';
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | utf8                       |
| character_set_connection | utf8                       |
| character_set_database   | utf8                       |
| character_set_filesystem | binary                     |
| character_set_results    | utf8                       |
| character_set_server     | utf8                       |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+

zignorp

unread,
Mar 31, 2015, 2:41:26 PM3/31/15
to django...@googlegroups.com
We've also gotten "can't initialize utf8" errors in the same intermittent time period.

OperationalError: (2019, "Can't initialize character set utf8 (path: /usr/share/mysql/charsets/)")




Reply all
Reply to author
Forward
0 new messages