jeudi 8 juin 2017

MySQL [Warning] Connection attributes of length 99 were truncated

I have a Laravel 5.4 application using a MySQL 5.7 private server (256Mo RAM), hosted on OVH. Here is my configuration for the SQL server:

max_allowed_packet: 4M
tmpdir: /dev/shm 
max_user_connections: 50 
interactive_timeout: 60 sec
autocommit: 1 
innodb_buffer_pool_size: 128M 
wait_timeout: 60 sec
max_connections: 100 
event_scheduler: OFF

On the client side, everything works fine. But when I look at my SQL log stdout.log I get warning messages every 5 minutes or so:

 2017-05-25T04:25:08.941078Z 67912 [Warning] Connection attributes of length 101 were truncated
 2017-05-25T04:30:08.583512Z 68243 [Warning] Connection attributes of length 101 were truncated
 2017-05-25T04:35:08.410368Z 68583 [Warning] Connection attributes of length 101 were truncated
 2017-05-25T04:40:09.442387Z 68916 [Warning] Connection attributes of length 101 were truncated
 2017-05-25T04:45:08.792321Z 69244 [Warning] Connection attributes of length 101 were truncated

The number after the date keeps increasing with the time. However, when I restart the SQL server, that number resets:

2017-06-08T10:10:08.000+00:00 2017-06-08T10:10:08.817309Z 106 [Warning] Connection attributes of length 99 were truncated
2017-06-08T10:15:08.000+00:00 2017-06-08T10:15:08.113874Z 227 [Warning] Connection attributes of length 99 were truncated
2017-06-08T10:20:09.000+00:00 2017-06-08T10:20:09.628578Z 399 [Warning] Connection attributes of length 99 were truncated
2017-06-08T10:25:08.000+00:00 2017-06-08T10:25:08.549874Z 625 [Warning] Connection attributes of length 99 were truncated
2017-06-08T10:30:10.000+00:00 2017-06-08T10:30:10.451034Z 895 [Warning] Connection attributes of length 99 were truncated

As the length is always around 100, I thought it came from max_connections: 100, so I increased it to 200: nothing changed.

I've found what this log message means on MySQL forums (http://ift.tt/2rYGQjI) :

   If a client attempted to send connection
   attribute key/value pairs that in aggregate had a size
   larger than the value of the
   performance_schema_session_connect_attrs_size system
   variable, the Performance Schema truncated the attribute
   data. In addition, the Performance Schema wrote this
   message to the error log if the log_warnings system
   variable was greater than zero:
    [Warning] Connection attributes of length N were truncated

My Laravel application doesn't send anything to MySQL, it just fetches data. I can't believe it would have to do with my users sessions as they are stored in files and not in the database. The cache storage is also file based, so I have no idea what could cause thoses log warnings.

Should I just ignore them, as the website seem to be working just fine?

I've found more about performance_schema_session_connect_attrs_size here: http://ift.tt/2sWCPcD

But I can't set this attrs_size explicitly to a larger value in my OVH SQL configuration.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire